sisyphus/.OLD/.scripts/wlsunset.sh

16 lines
456 B
Bash
Raw Normal View History

2022-04-21 21:59:06 +02:00
#!/usr/bin/env bash
# Script to disable for an hour or immediately continue wlsunset. 'Toggle'
# Check if wlsunset is still running
pid=$(pgrep wlsunset)
if [[ -z ${pid} ]] ; then
# Start wlsunset right away.
wlsunset -l 50 -L 4 -t 2500 &
else
# Currently stop wlsunset but restart in an hour.
kill ${pid}
notify-send 'Stopping sunset, restarting in an hour'
at now +1 hours -f ~/.scripts/wlsunset.sh
fi