From a68e184d4d873f0624a117dadc101620ba5fdb87 Mon Sep 17 00:00:00 2001 From: Evan Senter Date: Sat, 27 Jun 2026 23:14:23 +0100 Subject: [PATCH] chore: remove dark-notify btop theme switcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dark-notify drove automatic light/dark btop theme switching via the toggle-btop-theme callback. Remove it entirely — all tools now use Catppuccin Mocha permanently. - Drop the cormacrelf/tap/dark-notify formula from the Brewfile - Remove the dark-notify LaunchAgent install block from bootstrap.sh (and the now-orphaned `local dotfiles_dir`) and its uninstall.sh teardown - Delete LaunchAgents/com.user.dark-notify.plist and home/.bin/toggle-btop-theme (the latter existed solely as dark-notify's callback) - Update README, CLAUDE.md, and the catppuccin-theming skill accordingly Also set Claude Code `tui: "fullscreen"` in settings.json. Co-Authored-By: Claude Opus 4.8 (1M context) --- Brewfile | 1 - CLAUDE.md | 4 +- LaunchAgents/com.user.dark-notify.plist | 16 -------- README.md | 7 ---- bootstrap.sh | 39 ------------------ home/.bin/toggle-btop-theme | 41 ------------------- home/.claude/settings.json | 3 +- .../skills/catppuccin-theming/SKILL.md | 10 ++--- uninstall.sh | 4 -- 9 files changed, 7 insertions(+), 118 deletions(-) delete mode 100644 LaunchAgents/com.user.dark-notify.plist delete mode 100755 home/.bin/toggle-btop-theme diff --git a/Brewfile b/Brewfile index 526eb15d..717ea88f 100644 --- a/Brewfile +++ b/Brewfile @@ -31,7 +31,6 @@ brew "direnv" # Directory-specific env vars brew "glow" # Terminal markdown viewer brew "tldr" # Simplified man pages brew "watch" # Run command periodically -brew "cormacrelf/tap/dark-notify" if OS.mac? # Dark mode detection # Languages & Runtimes brew "go" diff --git a/CLAUDE.md b/CLAUDE.md index a9ae2236..bf3b84bd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -87,8 +87,6 @@ Files in `home/` are symlinked to `~` by `bootstrap.sh`. This allows version con **Prompt** (`home/.zsh_prompt`) - Timer displayed if command takes >0s. -**Dark Mode Switching** (`home/.bin/toggle-btop-theme`) - Switches btop theme based on macOS appearance. Requires `dark-notify`. - **Claude Code** (`home/.claude/`) - Global config, agents, commands, contrib scripts, hooks, skills, settings. **Hooks** (`home/.claude/hooks/`) - Shell scripts for Claude Code lifecycle events. See `hooks/README.md` for architecture and details. When adding or modifying hooks, update the README. @@ -117,7 +115,7 @@ Files in `home/` are symlinked to `~` by `bootstrap.sh`. This allows version con LaunchAgent plists live in `~/Library/LaunchAgents/`. The external service repos (event-bus, session-analytics, memory-store) have their own `make install-server`; obsidian-mcp is set up by *this* repo's bootstrap (`claude mcp add` + plist in `LaunchAgents/`, wrapper in `home/.bin/obsidian-mcp-start`, requires Obsidian with the Local REST API plugin running). Reload with `launchctl unload` + `launchctl load`. -Note: `agent-memory-store` is documented infra but is **not** provisioned by bootstrap (no `claude mcp add`, no `AGENT_MEMORY_STORE_URL` in `settings.local.json`) — it's registered out-of-band where used. The repo-managed LaunchAgents are: `com.evansenter.obsidian-mcp` (gateway only), `com.evansenter.sysload` (zellij CPU/RAM widget, if zellij installed), `com.user.dark-notify` (btop dark-mode switching, if dark-notify installed), and `com.user.cargo-sweep` (periodic `cargo sweep`, if cargo installed). +Note: `agent-memory-store` is documented infra but is **not** provisioned by bootstrap (no `claude mcp add`, no `AGENT_MEMORY_STORE_URL` in `settings.local.json`) — it's registered out-of-band where used. The repo-managed LaunchAgents are: `com.evansenter.obsidian-mcp` (gateway only), `com.evansenter.sysload` (zellij CPU/RAM widget, if zellij installed), and `com.user.cargo-sweep` (periodic `cargo sweep`, if cargo installed). **Adding new LaunchAgents:** Plists go in the top-level `LaunchAgents/` directory (NOT `home/Library/LaunchAgents/`). Use `__HOME__` as a placeholder for the user's home directory — `install_launch_agent()` in bootstrap does `sed` substitution at install time. Logs go to `~/.local/log/`. Add an `install_launch_agent` call in `install_launch_agents()`, gated on the binary being present. diff --git a/LaunchAgents/com.user.dark-notify.plist b/LaunchAgents/com.user.dark-notify.plist deleted file mode 100644 index dbf1873a..00000000 --- a/LaunchAgents/com.user.dark-notify.plist +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Label - com.user.dark-notify - KeepAlive - - ProgramArguments - - __HOMEBREW_PREFIX__/bin/dark-notify - -c - __HOME__/.bin/toggle-btop-theme - - - diff --git a/README.md b/README.md index a403f5e9..f9804214 100644 --- a/README.md +++ b/README.md @@ -123,17 +123,10 @@ On a bare macOS install, in order: - **tmux:** press `prefix + I` to install TPM plugins. - **iTerm2:** import the Catppuccin color preset (`preferences/` / `vendor/iterm-catppuccin/`). - **zellij:** `zellij kill-all-sessions` so the symlinked config is picked up (hot-reload doesn't work with symlinks). - - **btop dark-mode switching (optional):** `brew install cormacrelf/tap/dark-notify` then re-run `./bootstrap.sh -f`. - **Gateway host only:** open Obsidian with the Local REST API plugin enabled (obsidian-mcp's wrapper backs off until it's reachable). ### Optional dependencies -**Dark mode theme switching** (btop): -```bash -brew install cormacrelf/tap/dark-notify -./bootstrap.sh # Re-run to install LaunchAgent -``` - **Claude Code** (commands, hooks, settings symlinked to ~/.claude/): ```bash ./bootstrap.sh # Symlinks commands/, hooks/, settings.json, CLAUDE.md diff --git a/bootstrap.sh b/bootstrap.sh index 95ecb448..87d0b48b 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -428,45 +428,6 @@ install_launch_agents() { return 0 fi - local dotfiles_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" - - # Install dark-notify LaunchAgent (only if dark-notify is installed) - if command -v dark-notify >/dev/null 2>&1; then - local plist="com.user.dark-notify.plist" - local homebrew_prefix - if command -v brew >/dev/null 2>&1 && homebrew_prefix="$(brew --prefix 2>/dev/null)"; then - : # homebrew_prefix set by condition - elif [[ "$(uname -m)" == "arm64" ]]; then - homebrew_prefix="/opt/homebrew" - else - homebrew_prefix="/usr/local" - fi - local new_plist_content - new_plist_content=$(sed -e "s|__HOME__|$HOME|g" -e "s|__HOMEBREW_PREFIX__|$homebrew_prefix|g" "$dotfiles_dir/LaunchAgents/$plist") - local dest_plist="$HOME/Library/LaunchAgents/$plist" - - mkdir -p "$HOME/Library/LaunchAgents" - - local tmp_plist - tmp_plist=$(mktemp) - echo "$new_plist_content" > "$tmp_plist" - - if [[ ! -f "$dest_plist" ]] || ! cmp -s "$tmp_plist" "$dest_plist"; then - echo "Installing LaunchAgent: $plist" - mv "$tmp_plist" "$dest_plist" - - launchctl bootout "gui/$(id -u)/com.user.dark-notify" 2>/dev/null || true - launchctl bootstrap "gui/$(id -u)" "$dest_plist" || true - - "$HOME/.bin/toggle-btop-theme" - else - rm -f "$tmp_plist" - fi - else - echo "Skipping dark-notify LaunchAgent (dark-notify not installed)" - echo " Install with: brew install cormacrelf/tap/dark-notify" - fi - # Install cargo-sweep LaunchAgent (only if cargo is installed) if command -v cargo >/dev/null 2>&1; then install_launch_agent "com.user.cargo-sweep.plist" diff --git a/home/.bin/toggle-btop-theme b/home/.bin/toggle-btop-theme deleted file mode 100755 index 2150e170..00000000 --- a/home/.bin/toggle-btop-theme +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -# Toggle btop theme based on macOS dark/light mode -# Called by dark-notify when system appearance changes -# Usage: toggle-btop-theme [light|dark] - -BTOP_CONF="$HOME/.config/btop/btop.conf" - -# Check if btop config exists -if [[ ! -f "$BTOP_CONF" ]]; then - exit 0 -fi - -# Determine mode from argument or system preference -MODE="$1" -if [[ -z "$MODE" ]]; then - # No argument - check system preference directly - if [[ $(defaults read -g AppleInterfaceStyle 2>/dev/null) == "Dark" ]]; then - MODE="dark" - else - MODE="light" - fi -fi - -# Select theme based on mode -if [[ "$MODE" == "dark" ]]; then - THEME="catppuccin_mocha" -else - THEME="catppuccin_latte" -fi - -# Update btop config (macOS sed requires '' after -i; Linux would use -i alone) -if [[ -L "$BTOP_CONF" ]]; then - TARGET="$(readlink "$BTOP_CONF")" - rm -f "$BTOP_CONF" - cp "$TARGET" "$BTOP_CONF" -fi -sed -i '' "s/^color_theme = .*/color_theme = \"$THEME\"/" "$BTOP_CONF" - -# Signal btop to reload config (if running) -pkill -SIGUSR2 btop 2>/dev/null || true diff --git a/home/.claude/settings.json b/home/.claude/settings.json index d460c7b9..fdbab85c 100644 --- a/home/.claude/settings.json +++ b/home/.claude/settings.json @@ -137,5 +137,6 @@ "skipDangerousModePermissionPrompt": true, "theme": "auto", "remoteControlAtStartup": true, - "agentPushNotifEnabled": true + "agentPushNotifEnabled": true, + "tui": "fullscreen" } diff --git a/home/.claude/skills/catppuccin-theming/SKILL.md b/home/.claude/skills/catppuccin-theming/SKILL.md index d9e22dc5..deb99db2 100644 --- a/home/.claude/skills/catppuccin-theming/SKILL.md +++ b/home/.claude/skills/catppuccin-theming/SKILL.md @@ -71,9 +71,7 @@ When configuring a new CLI tool: ## Dark/Light Mode Switching -`dark-notify` monitors macOS appearance changes. Currently only btop switches themes automatically (`home/.bin/toggle-btop-theme`). Other tools use Mocha (dark) permanently. - -To add another tool to auto-switching: -1. Add a case to `toggle-btop-theme` (or create a new script) -2. The script receives "light" or "dark" as `$1` -3. Use Latte for light mode, Mocha for dark mode +All tools use Mocha (dark) permanently — there is no automatic light/dark +switching. If you want to add it for a tool, drive a script off macOS appearance +(e.g. `defaults read -g AppleInterfaceStyle`) and swap Latte (light) for Mocha +(dark). diff --git a/uninstall.sh b/uninstall.sh index 95b84e1a..3c7ebc6d 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -36,10 +36,6 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then rm "$link" && echo "Removed: $link" done - # Unload and remove dark-notify LaunchAgent - launchctl bootout "gui/$(id -u)/com.user.dark-notify" 2>/dev/null || true - rm -f ~/Library/LaunchAgents/com.user.dark-notify.plist - # Remove btop theme symlinks rm -f ~/.config/btop/themes/catppuccin_*.theme 2>/dev/null