diff --git a/dotfiles/bin/.bin/lockscreen b/dotfiles/bin/.bin/lockscreen new file mode 100755 index 0000000..0c2d838 --- /dev/null +++ b/dotfiles/bin/.bin/lockscreen @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +grim - | convert - -scale 50% -blur 0x20 -fill black -colorize 50% /tmp/lockscreen.png +swaylock -i /tmp/lockscreen.png & + +if [ 'suspend' = "$1" ]; then + systemctl suspend +fi \ No newline at end of file diff --git a/dotfiles/sway/.config/sway/config b/dotfiles/sway/.config/sway/config index 315589b..d08dcb7 100644 --- a/dotfiles/sway/.config/sway/config +++ b/dotfiles/sway/.config/sway/config @@ -214,8 +214,8 @@ bar { } } -bindsym $mod+ctrl+shift+l exec 'swaylock' -bindsym $mod+ctrl+alt+shift+l exec 'swaylock & systemctl suspend' +bindsym $mod+ctrl+shift+l exec '/home/lub/.bin/lockscreen' +bindsym $mod+ctrl+alt+shift+l exec '/home/lub/.bin/lockscreen suspend' smart_gaps on gaps inner 3