summary refs log tree commit diff
path: root/.config/gammastep/hooks/switch.sh
blob: fae86ec472a0cfbac491978c377df0bd044798c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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