dotfiles/.config/scripts/sway/lockscreen

10 lines
301 B
Plaintext
Raw Normal View History

2023-04-20 03:13:20 +08:00
#!/bin/sh
# Times the screen off and puts it to background
swayidle \
timeout 1 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"; set-primary-monitor' &
2023-04-20 03:13:20 +08:00
# Locks the screen immediately
swaylock -c 000000
# Kills last background task so idle timer doesn't keep running
kill %%