aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/setbglblur
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-04-03 01:18:01 +0300
committerYaroslav <contact@yaroslavps.com>2020-04-03 01:18:01 +0300
commita902076085c48665e62197c3f4465906ccf09f4d (patch)
tree89c4b0efef1dfa7095fcd0ba792897a45a71d739 /dotfiles/.local/bin/setbglblur
parent74456ddfdb8be3d556c16e589c9aeb42eea54d37 (diff)
downloadswayrice-a902076085c48665e62197c3f4465906ccf09f4d.tar.gz
swayrice-a902076085c48665e62197c3f4465906ccf09f4d.zip
lockscreen improvements
Diffstat (limited to 'dotfiles/.local/bin/setbglblur')
-rwxr-xr-xdotfiles/.local/bin/setbglblur21
1 files changed, 18 insertions, 3 deletions
diff --git a/dotfiles/.local/bin/setbglblur b/dotfiles/.local/bin/setbglblur
index 8a3d51b..b0c55bc 100755
--- a/dotfiles/.local/bin/setbglblur
+++ b/dotfiles/.local/bin/setbglblur
@@ -2,7 +2,22 @@
vertical=$(swaymsg -t get_outputs | jq ".[0].current_mode.height")
horizontal=$(swaymsg -t get_outputs | jq ".[0].current_mode.width")
+scale=$(swaymsg -t get_outputs | jq ".[0].scale")
+barheight=$(echo ""$scale" * 27" | bc -l)
-convert $1 -resize ${horizontal}x${vertical}\> ~/.config/lockwall.png
-convert ~/.config/lockwall.png -brightness-contrast -20,-20 -paint 1 -noise 0x8 -blur 9,9 ~/.config/lockwall.png
-convert ~/.config/lockwall.png ~/.config/lock.png -gravity center -composite ~/.config/lockwall.png
+convert $1 -resize "$horizontal"x"$vertical" ~/.config/lockwall.png
+convert ~/.config/lockwall.png \
+ -brightness-contrast -20,-20 \
+ -paint 1 \
+ -noise 0x8 \
+ -blur 9,9 \
+ -background "#00000000" \
+ -gravity North \
+ -chop 0x"$barheight" \
+ -gravity South \
+ -extent "$horizontal"x"$vertical" \
+ ~/.config/lockwall.png
+convert ~/.config/lockwall.png ~/.config/lock.png \
+ -gravity center \
+ -composite \
+ ~/.config/lockwall.png