diff --git a/.config/sway/conf.d/keybinds b/.config/sway/conf.d/keybinds index 3a4bc1a..84708d9 100644 --- a/.config/sway/conf.d/keybinds +++ b/.config/sway/conf.d/keybinds @@ -23,7 +23,8 @@ bindsym $mod+Shift+c reload # Lock the screen - bindsym Mod5+l exec swaylock -c 000000 + #bindsym Mod5+l exec swaylock -c 000000 + bindsym Mod5+l exec ~/.local/bin/scripts/lock_script # Select area for screenshot and copy to clipboard bindsym $mod+Shift+s exec IMG=~/Pictures/$(date +%Y-%m-%d_%H-%m-%s).png && grim -g "$(slurp)" $IMG && wl-copy < $IMG diff --git a/.local/bin/scripts/lock_script b/.local/bin/scripts/lock_script new file mode 100755 index 0000000..c90f2e2 --- /dev/null +++ b/.local/bin/scripts/lock_script @@ -0,0 +1,6 @@ +#!/bin/bash +swayidle -w \ + timeout 1 'swaylock -f -c 000000' \ + timeout 2 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"; pkill -nx swayidle' +