feat(macos): Alacritty follows system light/dark appearance

New setup — due for review after you run darwin-rebuild switch and
live with it for a few days. See CLAUDE.md (Alacritty) and
assets/alacritty/README.md.

- HM: import active-colors.toml + Catppuccin latte/mocha fragments
- nix-darwin: launchd.user.agents.alacritty-system-theme + PATH helper
- fish: background sync on Darwin; theme.sh no longer rebuilds for Alacritty
- Remove switch-alacritty-theme.sh (sed + darwin-rebuild per toggle)

Made-with: Cursor
This commit is contained in:
DannyDannyDanny 2026-03-23 19:16:05 +01:00
parent 18ccebc109
commit b311e21d5b
15 changed files with 196 additions and 293 deletions

View file

@ -1,27 +1,9 @@
#!/bin/bash
# Simple setup for Alacritty theme synchronization
# This creates the theme file and rebuilds the Nix configuration
# One-shot sync of Alacritty palette + nvim marker from current macOS appearance.
set -e
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Setting up simple Alacritty theme synchronization..."
# Run the theme sync script to create the initial theme file
echo "Detecting current system theme..."
"$SCRIPT_DIR/sync-alacritty-theme.sh"
echo "Syncing from system appearance..."
"$SCRIPT_DIR/alacritty-sync-system-theme.sh"
echo ""
echo "Setup complete!"
echo ""
echo "To apply the theme to Alacritty, run:"
echo " cd nixos && sudo darwin-rebuild switch --flake .#Daniel-Macbook-Air"
echo ""
echo "To sync themes when your system theme changes:"
echo " $SCRIPT_DIR/sync-alacritty-theme.sh && cd nixos && sudo darwin-rebuild switch --flake .#Daniel-Macbook-Air"
echo ""
echo "For automatic theme switching, you can set up a LaunchAgent or"
echo "run the sync script manually when needed."
echo "Done. Alacritty reloads colors automatically if live_config_reload is enabled."
echo "A LaunchAgent (nix-darwin: launchd.user.agents.alacritty-system-theme) runs this every 30s."