summaryrefslogtreecommitdiff
path: root/slockd
blob: 64fefb6aa4a02c56dcad2b52910735e87ddee063 (plain)
1
2
3
4
5
6
7
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