From 13b80fe68696193d7ad5c60748ccde00f9ea516d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 12 Jan 2025 17:26:24 +0100 Subject: fix indentation --- user/settings/darwin.nix | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'user/settings/darwin.nix') diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix index c79fb155..6571e6d8 100644 --- a/user/settings/darwin.nix +++ b/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 + '' ) ) ) -- cgit 1.4.1