Added scripts

This commit is contained in:
Tibo De Peuter 2022-04-22 15:33:04 +02:00
parent 6e570be6af
commit f8b6378c3f
2 changed files with 41 additions and 0 deletions

15
scripts/wlsunset.sh Executable file
View file

@ -0,0 +1,15 @@
#!/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