Move args check below functions in switch-theme
This commit is contained in:
parent
7e53079246
commit
867b817501
|
@ -1,13 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: switch_theme <mode>"
|
||||
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 <mode>"
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue