1
0
Fork 0

Add lock script

main
Ambrose Chua 2023-01-20 12:33:53 +08:00
parent 825f5c0880
commit ee8c942922
1 changed files with 10 additions and 0 deletions

10
.local/bin/lock Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
for socket in /run/user/$(id -u)/sway-ipc.*.sock; do
export SWAYSOCK="$socket"
if [ "$1" = "unlock" ]; then
killall -USR1 swaylock
else
swaymsg exec '$swaylock'
fi
done