diff options
-rwxr-xr-x | slockd | 11 | ||||
-rwxr-xr-x | waylockd | 7 |
2 files changed, 10 insertions, 8 deletions
@@ -1,12 +1,7 @@ #!/bin/sh -if [ -z "$WAYLAND_DISPLAY" ]; then - LOCKER=slock -else - LOCKER=waylock -fi +[ "$(pgrep -U$(whoami) -x slockd | wc -l)" -gt "2" ] && echo "true" - -while [ 1 -gt 0 ]; do - $LOCKER && exit +while true; do + slock && exit done diff --git a/waylockd b/waylockd new file mode 100755 index 0000000..b371abd --- /dev/null +++ b/waylockd @@ -0,0 +1,7 @@ +#!/bin/sh + +[ "$(pgrep -U$(whoami) -x waylockd | wc -l)" -gt "2" ] && echo "true" + +while true; do + cat ~/.config/waylock/config | xargs waylock && exit +done |