diff options
| author | Robert Günzler <r@gnzler.io> | 2021-04-26 01:58:12 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-04-26 02:09:50 +0200 |
| commit | 2fa1b42fc9e37dc1e0baa02f8ede0a6655b72858 (patch) | |
| tree | 73dd41d7c1f789d0eae56d121d63147d5c13f1d0 /.config/gammastep | |
| parent | 5bd9cdf6e45da7a9d22d9aedeb3ecd9fdce33bf0 (diff) | |
gammastep: switch desktop theme when going into night mode
Diffstat (limited to '.config/gammastep')
| -rw-r--r-- | .config/gammastep/config.ini | 2 | ||||
| -rwxr-xr-x | .config/gammastep/hooks/notif.sh | 10 | ||||
| -rwxr-xr-x | .config/gammastep/hooks/switch.sh | 27 |
3 files changed, 28 insertions, 11 deletions
diff --git a/.config/gammastep/config.ini b/.config/gammastep/config.ini index 2d08e66..bad0e02 100644 --- a/.config/gammastep/config.ini +++ b/.config/gammastep/config.ini @@ -1,4 +1,4 @@ -[redshift] +[general] adjustment-method=wayland gamma=0.9 fade=1 diff --git a/.config/gammastep/hooks/notif.sh b/.config/gammastep/hooks/notif.sh deleted file mode 100755 index de04d6c..0000000 --- a/.config/gammastep/hooks/notif.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -case "$1" in - period-changed) - case "$3" in - transition|night) pkill -USR2 waybar-redshift ;; - none|day) pkill -USR1 waybar-redshift ;; - esac - ;; -esac diff --git a/.config/gammastep/hooks/switch.sh b/.config/gammastep/hooks/switch.sh new file mode 100755 index 0000000..fae86ec --- /dev/null +++ b/.config/gammastep/hooks/switch.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -x + +case "$1" in + period-changed) + + case "$3" in + night|transition) + notify-send gammastep "changing to night" + gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark + pkill -fe -USR2 waybar-gammastep + ;; + + daytime) + notify-send gammastep "changing to day" + gsettings set org.gnome.desktop.interface gtk-theme Adwaita + pkill -fe -USR1 waybar-gammastep + ;; + + none) + notify-send gammastep "turning off" + pkill -fe -USR1 waybar-gammastep + ;; + esac + ;; +esac |