From e3721bc93274af1e69902d2fdcd595f337ea3ab8 Mon Sep 17 00:00:00 2001 From: lub Date: Sun, 18 Aug 2019 16:54:32 +0200 Subject: [PATCH] add lockscreen command and bindsyms --- dotfiles/bin/.bin/lockscreen | 9 +++++++++ dotfiles/sway/.config/sway/config | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 dotfiles/bin/.bin/lockscreen 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