]> src.twobees.de Git - dotfiles.git/commitdiff
lockscreen
authorTobias Sachs <git-pngdhxpf-ts@twobees.de>
Sun, 4 Aug 2024 10:14:27 +0000 (12:14 +0200)
committerTobias Sachs <git-pngdhxpf-ts@twobees.de>
Sun, 4 Aug 2024 10:14:27 +0000 (12:14 +0200)
stow/bin/.bin/lockscreen.sh

index 536e95a41c4b258a8b31c187e00e9d37200f81b2..0447ae9fdab537a15892f6a128a76a2428fcbc43 100755 (executable)
@@ -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"