aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/setbglsimple
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin/setbglsimple')
-rwxr-xr-xdotfiles/.local/bin/setbglsimple9
1 files changed, 9 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/setbglsimple b/dotfiles/.local/bin/setbglsimple
index 51ac5ba..dacd9c8 100755
--- a/dotfiles/.local/bin/setbglsimple
+++ b/dotfiles/.local/bin/setbglsimple
@@ -2,6 +2,15 @@
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" * 28" | bc -l)
convert $1 -resize ${horizontal}x${vertical}\> ~/.config/lockwall.png
+convert ~/.config/lockwall.png \
+ -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