summaryrefslogtreecommitdiff
path: root/slockd
diff options
context:
space:
mode:
Diffstat (limited to 'slockd')
-rwxr-xr-xslockd8
1 files changed, 8 insertions, 0 deletions
diff --git a/slockd b/slockd
new file mode 100755
index 0000000..64fefb6
--- /dev/null
+++ b/slockd
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+WLCNT="$(pgrep -U$(whoami) -x slockd | wc -l)"
+[ "${WLCNT:-0}" -gt "2" ] && printf "Already running!\n" && exit
+
+while true; do
+ slock && exit
+done