chore: clean up dotfiles and add gitignore whitelist
Switch to whitelist-based .gitignore to only track essential configs: nvim, yazi, kitty, zsh, ideavim, karabiner, tmux, scripts, starship. Remove history, compiled files, and plugin dirs from tracking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
36
scripts/start-kanata.sh
Executable file
36
scripts/start-kanata.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Kanata Startup Script
|
||||
# Starts Kanata with proper configuration and logging
|
||||
|
||||
KANATA_CONFIG="$HOME/Library/Application Support/kanata/kanata.kbd"
|
||||
LOG_FILE="$HOME/Library/Logs/kanata.log"
|
||||
|
||||
# Create log directory if it doesn't exist
|
||||
mkdir -p "$(dirname "$LOG_FILE")"
|
||||
|
||||
# Check if kanata is already running
|
||||
if pgrep -x "kanata" > /dev/null; then
|
||||
echo "$(date): Kanata is already running" >> "$LOG_FILE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if config file exists
|
||||
if [ ! -f "$KANATA_CONFIG" ]; then
|
||||
echo "$(date): ERROR - Kanata config file not found: $KANATA_CONFIG" >> "$LOG_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Start Kanata
|
||||
echo "$(date): Starting Kanata with config: $KANATA_CONFIG" >> "$LOG_FILE"
|
||||
|
||||
# Run kanata in the background with logging
|
||||
/opt/homebrew/bin/kanata -c "$KANATA_CONFIG" >> "$LOG_FILE" 2>&1 &
|
||||
|
||||
# Get the PID
|
||||
KANATA_PID=$!
|
||||
|
||||
# Save PID for easier management
|
||||
echo "$KANATA_PID" > "$HOME/.kanata.pid"
|
||||
|
||||
echo "$(date): Kanata started with PID: $KANATA_PID" >> "$LOG_FILE"
|
||||
Reference in New Issue
Block a user