aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/setbglsimple
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/setbglsimple
parent74456ddfdb8be3d556c16e589c9aeb42eea54d37 (diff)
downloadswayrice-a902076085c48665e62197c3f4465906ccf09f4d.tar.gz
swayrice-a902076085c48665e62197c3f4465906ccf09f4d.zip
lockscreen improvements
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