From f814325966b5c0b83574303c7fd8164e27a5c79d Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Wed, 19 Apr 2023 20:13:20 +0100 Subject: [PATCH] Added lockscreens script --- .config/scripts/bin/lockscreen | 1 + .config/scripts/sway/lockscreen | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 120000 .config/scripts/bin/lockscreen create mode 100755 .config/scripts/sway/lockscreen 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 %%