From 3a3ae397ce411c1d00d30ad06c85032082318811 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 29 Dec 2024 19:59:10 +0100 Subject: move kitty dark/light toggle to kitty.nix --- user/settings/darwin.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'user/settings/darwin.nix') diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix index 1ea3d470..1c0f6a74 100644 --- a/user/settings/darwin.nix +++ b/user/settings/darwin.nix @@ -66,6 +66,7 @@ ( pkgs.writeShellScript "toggle-dark-light-mode" + ( '' wait4path /nix if defaults read -g AppleInterfaceStyle &>/dev/null ; then @@ -74,7 +75,6 @@ MODE="light" fi emacsclient="${config.programs.emacs.finalPackage}/bin/emacsclient" - kitty="${pkgs.kitty}/bin/kitty +kitten themes --config-file-name=theme.conf --reload-in=all --cache-age=-1" emacsSwitchTheme () { if pgrep -q Emacs; then if [[ $MODE == "dark" ]]; then @@ -88,18 +88,9 @@ fi fi } - kittySwitchTheme () { - if pgrep -q kitty; then - if [[ $MODE == "dark" ]]; then - $kitty 'Modus Vivendi' - elif [[ $MODE == "light" ]]; then - $kitty 'Modus Operandi' - fi - fi - } emacsSwitchTheme - kittySwitchTheme '' + ) ) ) ]; -- cgit 1.4.1