From f4f563016bb1d4bff04e86326a7f180a48848a2f Mon Sep 17 00:00:00 2001 From: Tobias Sachs Date: Sun, 4 Aug 2024 12:14:27 +0200 Subject: [PATCH] lockscreen --- stow/bin/.bin/lockscreen.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stow/bin/.bin/lockscreen.sh b/stow/bin/.bin/lockscreen.sh index 536e95a..0447ae9 100755 --- a/stow/bin/.bin/lockscreen.sh +++ b/stow/bin/.bin/lockscreen.sh @@ -1,10 +1,10 @@ #!/bin/bash -outfile=$1 +what=$1 +outfile=/tmp/lock.png -if [ -z "$outfile" ];then - echo output path missing >&2 - outfile=/tmp/lock.png +if [ "x$what" == "xDisplayOff" ]; then + grim - | convert -filter Gaussian -resize 20% -blur 0x2.5 -resize 500% png:- "$outfile" + swaymsg "output * dpms off" +else + swaylock -f -c 00FF00 -i "$outfile" fi - -grim - | convert -filter Gaussian -resize 20% -blur 0x2.5 -resize 500% png:- "$outfile" -swaylock -f -c 00FF00 -i "$outfile" -- 2.39.5