Added lockscreens script

This commit is contained in:
Sheldon Lee 2023-04-19 20:13:20 +01:00
parent 5b02adfa88
commit f814325966
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1 @@
../sway/lockscreen

View File

@ -0,0 +1,9 @@
#!/bin/sh
# Times the screen off and puts it to background
swayidle \
timeout 1 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' &
# Locks the screen immediately
swaylock -c 000000
# Kills last background task so idle timer doesn't keep running
kill %%