.dotfiles/.config/waybar/scripts/toggle-theme

22 lines
389 B
Plaintext
Raw Permalink Normal View History

2022-04-23 03:41:04 +02:00
#!/bin/bash
DARK_MODE_STATUS_FILE=~/.cache/dark-mode
CURRENT_DARK_MODE=$( cat $DARK_MODE_STATUS_FILE )
2022-05-04 18:55:48 +02:00
LIGHT="盛"
DARK=""
2022-04-23 03:41:04 +02:00
if [ "$1" == "--toggle" ]; then
if [ $CURRENT_DARK_MODE == "light" ]; then
2022-05-04 18:55:48 +02:00
~/.config/waybar/scripts/set-theme dark
2022-04-23 03:41:04 +02:00
else
2022-05-04 18:55:48 +02:00
~/.config/waybar/scripts/set-theme light
2022-04-23 03:41:04 +02:00
fi
fi
if [ $CURRENT_DARK_MODE != "light" ]; then
echo $DARK
else
echo $LIGHT
fi