diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-06-13 11:52:33 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-06-13 11:52:33 -0400 |
commit | 0f0409e3ffef48bd20b3aa31d03cb1ac6e35f385 (patch) | |
tree | c244fd397b0cebb0dcbac339960c1442dae1a842 /autolocker.sh | |
parent | 1a26090ba7df4b076f011b8f9ac5d4d81dc14a02 (diff) | |
download | scripts-0f0409e3ffef48bd20b3aa31d03cb1ac6e35f385.tar.xz scripts-0f0409e3ffef48bd20b3aa31d03cb1ac6e35f385.zip |
cleanup, updated locking/autolocking
Diffstat (limited to 'autolocker.sh')
-rwxr-xr-x | autolocker.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/autolocker.sh b/autolocker.sh new file mode 100755 index 0000000..5c79e23 --- /dev/null +++ b/autolocker.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +notifier="notify-send -t=10000 '10 seconds to lock...'" +locker="xautolock -notify 10 -time 10 -locker locker.sh" + +if [ "$1" = "-d" ]; then + $locker -notifier "$notifier" +else + $locker -detectsleep -killtime 10 -killer "sleeper.sh" -notifier "$notifier" +fi |