diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/settings/darwin.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix index 75df5271..e3c5979c 100644 --- a/user/settings/darwin.nix +++ b/user/settings/darwin.nix @@ -82,6 +82,10 @@ enable = true; config = { WatchPaths = [ "${config.home.homeDirectory}/Library/Preferences/.GlobalPreferences.plist" ]; + StandardOutputPath = "/dev/null"; + StandardErrorPath = "/dev/null"; + RunAtLoad = true; + KeepAlive = false; ProgramArguments = [ "/bin/sh" ( @@ -90,17 +94,21 @@ pkgs.writeShellScript "toggle-dark-light-mode" '' + wait4path /nix if defaults read -g AppleInterfaceStyle &>/dev/null ; then MODE="dark" else MODE="light" fi + emacsclient="${config.programs.emacs.finalPackage}/bin/emacsclient" emacsSwitchTheme () { if pgrep -q Emacs; then if [[ $MODE == "dark" ]]; then - emacsclient --eval "(modus-themes-load-theme (cadr modus-themes-to-toggle))" + $emacsclient --eval "(modus-themes-load-theme (cadr modus-themes-to-toggle))" \ + --eval "(modify-all-frames-parameters '((ns-appearance '$MODE)))" elif [[ $MODE == "light" ]]; then - emacsclient --eval "(modus-themes-load-theme (car modus-themes-to-toggle))" + $emacsclient --eval "(modus-themes-load-theme (car modus-themes-to-toggle))" \ + --eval "(modify-all-frames-parameters '((ns-appearance '$MODE)))" fi fi } |