summary refs log tree commit diff
path: root/bin/darkmode
blob: 5fc591f6f219702db32b970f018683073f73c224 (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
#!/bin/sh

set -e
[ -n "$DEBUG" ] && set -x

icons=/usr/share/icons/mdi/scalable

case "${1}" in
dawn | day*)
	# notify-send -i ${icons}/car-light-high.svg -a gamma "gamma: day" "switching to light theme"
	gsettings set org.gnome.desktop.interface gtk-theme Adwaita
	pkill -fe -USR1 waybar-gammastep
	;;

dusk | night)
	# notify-send -i ${icons}/car-light-dimmed.svg -a gamma "gamma: night" "switching to dark theme"
	gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark
	pkill -fe -USR2 waybar-gammastep
	;;

*)
	printf "usage: %s [night|daytime]\n" "$(basename "$(readlink -f -- "$0")")"
	;;
esac