2022-10-30 16:03:16 +01: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.
|
2023-11-12 20:08:01 +01:00
|
|
|
wlsunset -l 50.50 -L 4.00 -t 3000 -T 6500 &
|
2022-10-30 16:03:16 +01:00
|
|
|
else
|
|
|
|
# Currently stop wlsunset but restart in an hour.
|
|
|
|
kill ${pid}
|
2023-11-12 20:08:01 +01:00
|
|
|
notify-send 'Stopping sunset' 'Restarting in an hour'
|
|
|
|
at now +1 hours -f "${0}"
|
2022-10-30 16:03:16 +01:00
|
|
|
fi
|