summaryrefslogtreecommitdiff
path: root/autolocker.sh
diff options
context:
space:
mode:
Diffstat (limited to 'autolocker.sh')
-rwxr-xr-xautolocker.sh10
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