diff --git a/.config/scripts/bin/lockscreen b/.config/scripts/bin/lockscreen new file mode 120000 index 0000000..72f81b2 --- /dev/null +++ b/.config/scripts/bin/lockscreen @@ -0,0 +1 @@ +../sway/lockscreen \ No newline at end of file diff --git a/.config/scripts/sway/lockscreen b/.config/scripts/sway/lockscreen new file mode 100755 index 0000000..9efb8c9 --- /dev/null +++ b/.config/scripts/sway/lockscreen @@ -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 %%