Move args check below functions in switch-theme
This commit is contained in:
parent
7e53079246
commit
867b817501
|
@ -1,13 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
|
||||||
echo "Usage: switch_theme <mode>"
|
|
||||||
echo "mode: dark|light"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mode=$1
|
|
||||||
|
|
||||||
capitalize() {
|
capitalize() {
|
||||||
printf '%s' "$1" | head -c 1 | tr "[:lower:]" "[:upper:]"
|
printf '%s' "$1" | head -c 1 | tr "[:lower:]" "[:upper:]"
|
||||||
printf '%s' "$1" | tail -c '+2'
|
printf '%s' "$1" | tail -c '+2'
|
||||||
|
@ -33,6 +25,14 @@ recolor_zathura() {
|
||||||
done <"$temp_file"
|
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
|
if [ "$mode" = "light" ]; then
|
||||||
emacsclient --eval "(load-theme 'doom-nord-light 'no-confirm)"
|
emacsclient --eval "(load-theme 'doom-nord-light 'no-confirm)"
|
||||||
change_theme dark light
|
change_theme dark light
|
||||||
|
|
Loading…
Reference in New Issue