From b6755842eea03f9fd6002219d8ecb97b8ed03957 Mon Sep 17 00:00:00 2001 From: lub Date: Tue, 9 Feb 2021 18:03:40 +0100 Subject: [PATCH] let swayidle lock the screen --- dotfiles/bin/.bin/lockscreen | 7 ++----- dotfiles/sway/.config/sway/config | 7 ++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dotfiles/bin/.bin/lockscreen b/dotfiles/bin/.bin/lockscreen index 0c2d838..316dcfa 100755 --- a/dotfiles/bin/.bin/lockscreen +++ b/dotfiles/bin/.bin/lockscreen @@ -2,8 +2,5 @@ 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 +swaylock -i /tmp/lockscreen.png +rm /tmp/lockscreen.png \ No newline at end of file diff --git a/dotfiles/sway/.config/sway/config b/dotfiles/sway/.config/sway/config index f8b20fb..1f90d83 100644 --- a/dotfiles/sway/.config/sway/config +++ b/dotfiles/sway/.config/sway/config @@ -227,13 +227,14 @@ client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff -bindsym $mod+ctrl+shift+l exec 'lockscreen' -bindsym $mod+ctrl+alt+shift+l exec 'lockscreen suspend' - smart_gaps on gaps inner 2 default_border pixel 4 +bindsym $mod+ctrl+shift+l exec 'lockscreen' +bindsym $mod+ctrl+alt+shift+l exec 'systemctl suspend' +exec swayidle -w before-sleep 'lockscreen' + exec --no-startup-id nextcloud bindsym XF86AudioPrev exec --no-startup-id 'rhythmbox-client --no-start --previous'