summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.config/gammastep/config.ini2
-rwxr-xr-x.config/gammastep/hooks/notif.sh10
-rwxr-xr-x.config/gammastep/hooks/switch.sh27
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