diff options
author | Alan Pearce | 2023-09-07 19:21:19 +0200 |
---|---|---|
committer | Alan Pearce | 2023-09-07 19:21:19 +0200 |
commit | b9379384512f40491236c6187dbc72bc8a23d513 (patch) | |
tree | 7a496ff5d1ea01381fd3732b835829e3c4b38336 /user/settings | |
parent | 32977f82f79baa6b632ca710f2f87d62bc28c46e (diff) | |
download | nixfiles-b9379384512f40491236c6187dbc72bc8a23d513.tar.lz nixfiles-b9379384512f40491236c6187dbc72bc8a23d513.tar.zst nixfiles-b9379384512f40491236c6187dbc72bc8a23d513.zip |
darwin: auto-toggle dark/light mode in kitty
Diffstat (limited to 'user/settings')
-rw-r--r-- | user/settings/darwin.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix index f8665ac5..7037ddf9 100644 --- a/user/settings/darwin.nix +++ b/user/settings/darwin.nix @@ -77,6 +77,7 @@ MODE="light" fi emacsclient="${config.programs.emacs.finalPackage}/bin/emacsclient" + kitty="${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --cache-age=-1" emacsSwitchTheme () { if pgrep -q Emacs; then if [[ $MODE == "dark" ]]; then @@ -90,7 +91,17 @@ fi fi } - emacsSwitchTheme $@ + kittySwitchTheme () { + if pgrep -q kitty; then + if [[ $MODE == "dark" ]]; then + $kitty 'Alabaster Dark' + elif [[ $MODE == "light" ]]; then + $kitty 'Alabaster' + fi + fi + } + emacsSwitchTheme + kittySwitchTheme '' ) ) |