dotfiles/redshift/hook.sh

20 lines
383 B
Bash
Raw Normal View History

2017-01-26 13:48:55 +01:00
#!/bin/sh
notify(){
notify-send \
--app-name=redshift \
--urgency=low \
--icon=redshift \
--hint=int:transient:1 \
"${1}" "${2}"
}
2017-01-26 13:48:55 +01:00
case $1 in
period-changed)
notify "Redshift" "Period changed to $3"
2017-01-26 13:48:55 +01:00
;;
*)
notify "Redshift" "Redshift just fired an unknown hook with these options: '$*'. Ah, of course, this notification is just here, to troll you! :-P"
2017-01-26 13:48:55 +01:00
;;
esac