From 2fa1b42fc9e37dc1e0baa02f8ede0a6655b72858 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 26 Apr 2021 01:58:12 +0200 Subject: gammastep: switch desktop theme when going into night mode --- .config/gammastep/hooks/switch.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 .config/gammastep/hooks/switch.sh (limited to '.config/gammastep/hooks/switch.sh') 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 -- cgit 1.4.1