summaryrefslogtreecommitdiff
path: root/swaylockd
blob: 479e00366956e2f1ced63efeace71de3fd4cbfd9 (plain)
1
2
3
4
5
6
7
8
#!/bin/sh

WLCNT="$(pgrep -U$(whoami) -x swaylockd | wc -l)"
[ "${WLCNT:-0}" -gt "1" ] && printf "Already running!\n" && exit

while true; do
  swaylock && exit
done