summary refs log tree commit diff
path: root/bin/darkmode
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2022-02-09 00:25:29 +0100
committerRobert Günzler <r@gnzler.io>2022-02-09 00:25:29 +0100
commit433949455aef0696db3feeb7b9e1728ebd8ec32f (patch)
treec9d96a675fe3b96a7e6f2b6693cd285e89881695 /bin/darkmode
parent85e043c6f962ebb1cf9c3ba3e31753e8c7f227a8 (diff)
bin/darkmode: drop lockfiles
Diffstat (limited to 'bin/darkmode')
-rwxr-xr-xbin/darkmode23
1 files changed, 13 insertions, 10 deletions
diff --git a/bin/darkmode b/bin/darkmode
index 67f9ae1..55dc32f 100755
--- a/bin/darkmode
+++ b/bin/darkmode
@@ -3,25 +3,28 @@
 set -e
 [ -n "$DEBUG" ] && set -x
 
-icons=/usr/share/icons/mdi/scalable
+icon=$(iconez -n weather-sunset)
 
-case "${1}" in
-dawn | dusk)
-	touch "/tmp/darkmode.${1}"
-	;;
-esac
+# case "${1}" in
+# dawn | dusk)
+# 	touch "/tmp/darkmode.${1}"
+# 	;;
+# day* | night)
+# 	rm /tmp/darkmode* || true
+# 	;;
+# esac
 
 case "${1}" in
 dawn | day*)
-	[ -f "/tmp/darkmode.${1}" ] && exit 0
-	notify-send -i ${icons}/car-light-high.svg -a gamma "gamma: ${1}" "switching to light theme"
+	# [ -f "/tmp/darkmode.${1}" ] && exit 0
+	notify-send -i "${icon}" -a wlsunset "wlsunset" "switching to day <i>${1}</i>"
 	gsettings set org.gnome.desktop.interface gtk-theme Adwaita
 	pkill -fe -USR1 waybar-gammastep
 	;;
 
 dusk | night)
-	[ -f "/tmp/darkmode.${1}" ] && exit 0
-	notify-send -i ${icons}/car-light-dimmed.svg -a gamma "gamma: ${1}" "switching to dark theme"
+	# [ -f "/tmp/darkmode.${1}" ] && exit 0
+	notify-send -i "${icon}" -a wlsunset "wlsunset" "switching to <i>${1}</i>"
 	gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark
 	pkill -fe -USR2 waybar-gammastep
 	;;