diff --git a/scripts/.local/share/scripts/switch-theme b/scripts/.local/share/scripts/switch-theme index d28ecd0..87cb12d 100755 --- a/scripts/.local/share/scripts/switch-theme +++ b/scripts/.local/share/scripts/switch-theme @@ -1,13 +1,5 @@ #!/bin/sh -if [ $# -lt 1 ]; then - echo "Usage: switch_theme " - echo "mode: dark|light" - exit 1 -fi - -mode=$1 - capitalize() { printf '%s' "$1" | head -c 1 | tr "[:lower:]" "[:upper:]" printf '%s' "$1" | tail -c '+2' @@ -33,6 +25,14 @@ recolor_zathura() { done <"$temp_file" } +if [ $# -lt 1 ]; then + echo "Usage: switch_theme " + echo "mode: dark|light" + exit 1 +fi + +mode=$1 + if [ "$mode" = "light" ]; then emacsclient --eval "(load-theme 'doom-nord-light 'no-confirm)" change_theme dark light