diff options
| author | Robert Günzler <r@gnzler.io> | 2021-08-03 22:12:41 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-08-03 22:12:41 +0200 |
| commit | a17c17a9d847e3d401ea679ffa0e35c74c1849b5 (patch) | |
| tree | 1ff7e0fc7e158f7418417b363d5905db231c05fc /bin | |
| parent | 06eccec83a88b2af00b354bedc1a44713938a385 (diff) | |
bin/darkmode: support dusk/dawn properly
Diffstat (limited to '')
| -rwxr-xr-x | bin/darkmode | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/bin/darkmode b/bin/darkmode index 5b97f61..5fc591f 100755 --- a/bin/darkmode +++ b/bin/darkmode @@ -6,24 +6,19 @@ set -e icons=/usr/share/icons/mdi/scalable case "${1}" in - day*) - notify-send -i ${icons}/car-light-high.svg -a gamma "gamma: day" "switching to light theme" - gsettings set org.gnome.desktop.interface gtk-theme Adwaita - pkill -fe -USR1 waybar-gammastep - ;; +dawn | day*) + # notify-send -i ${icons}/car-light-high.svg -a gamma "gamma: day" "switching to light theme" + gsettings set org.gnome.desktop.interface gtk-theme Adwaita + pkill -fe -USR1 waybar-gammastep + ;; - night) - notify-send -i ${icons}/car-light-dimmed.svg -a gamma "gamma: night" "switching to dark theme" - gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark - pkill -fe -USR2 waybar-gammastep - ;; +dusk | night) + # notify-send -i ${icons}/car-light-dimmed.svg -a gamma "gamma: night" "switching to dark theme" + gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark + pkill -fe -USR2 waybar-gammastep + ;; - dusk | dawn) - # noop - # pkill -fe -USR2 waybar-gammastep - ;; - - *) - printf "usage: %s [night|daytime]\n" "$(basename "$(readlink -f -- "$0")")" - ;; +*) + printf "usage: %s [night|daytime]\n" "$(basename "$(readlink -f -- "$0")")" + ;; esac |