fix indentation
Alan Pearce alan@alanpearce.eu
Sun, 12 Jan 2025 17:26:24 +0100
1 files changed, 22 insertions(+), 22 deletions(-)
jump to
M user/settings/darwin.nix → user/settings/darwin.nix
@@ -65,29 +65,29 @@ ( 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 "(stimmung-themes-load-dark)" \ - --eval "(modify-all-frames-parameters '((ns-appearance '$MODE)))" - elif [[ $MODE == "light" ]]; then - $emacsclient \ - --eval "(stimmung-themes-load-light)" \ - --eval "(modify-all-frames-parameters '((ns-appearance '$MODE)))" - fi + '' + wait4path /nix + if defaults read -g AppleInterfaceStyle &>/dev/null ; then + MODE="dark" + else + MODE="light" fi - } - emacsSwitchTheme - '' + emacsclient="${config.programs.emacs.finalPackage}/bin/emacsclient" + emacsSwitchTheme () { + if pgrep -q Emacs; then + if [[ $MODE == "dark" ]]; then + $emacsclient \ + --eval "(stimmung-themes-load-dark)" \ + --eval "(modify-all-frames-parameters '((ns-appearance '$MODE)))" + elif [[ $MODE == "light" ]]; then + $emacsclient \ + --eval "(stimmung-themes-load-light)" \ + --eval "(modify-all-frames-parameters '((ns-appearance '$MODE)))" + fi + fi + } + emacsSwitchTheme + '' ) ) )