sway: Add lockscript to force displays off
This commit is contained in:
parent
28798e5968
commit
f1f8b9e810
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
6
.local/bin/scripts/lock_script
Executable file
6
.local/bin/scripts/lock_script
Executable file
|
@ -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'
|
||||
|
Loading…
Add table
Reference in a new issue