Remove dark-mode-notify, document the native approach
The launchd agent ran `pkill -usr1 zsh` on every appearance change, which made
every shell re-source .zshrc. That could never have achieved its goal: the tmux
status bar belongs to the tmux server and colours to a running nvim, so
re-sourcing a shell rc cannot retheme either. The one variable it set,
MACOS_APPEARANCE, was read by nothing. Its only real effect was firing on each
unlock — 5253 times on this machine, 3437 on the iMac — which is what drove the
~/.gitconfig.lock contention fixed in 583bbaa.
The agent and plist are removed from both machines; this drops the script.
ghostty, bat, delta and nvim all handle appearance natively, and tmux 3.6+
detects it over OSC 2031 (#{client_theme} already reports correctly). Wiring the
tmux client-light-theme/client-dark-theme hooks is left as the next step.
Also refreshes the stale parts of the README: the intro still explained
~/.gitconfig as a copy because .extra edited it, and the .extra example still
showed the `git config --global` calls that caused the lock errors, plus the
misspelled GIT_COMMITER_* vars. Following it would have reinstated the bug.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
583bbaa533
commit
59d5622442
2 changed files with 67 additions and 72 deletions
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
function switch-dark-mode()
|
||||
{
|
||||
local darkMode=true;
|
||||
|
||||
if [[ $(defaults read -g AppleInterfaceStyle 2> /dev/null) != 'Dark' ]]; then
|
||||
darkMode=false
|
||||
fi
|
||||
|
||||
if [[ $darkMode == true ]]; then
|
||||
echo "Switched to dark mode"
|
||||
export MACOS_APPEARANCE="dark"
|
||||
else
|
||||
echo "Switched to light mode"
|
||||
export MACOS_APPEARANCE="light"
|
||||
fi
|
||||
|
||||
# Reload zshrc
|
||||
pkill -usr1 zsh
|
||||
}
|
||||
|
||||
switch-dark-mode
|
||||
Loading…
Reference in a new issue