aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/setbglsimple
blob: 28869cd79869d76e2d76feca8e5f0f4ba48250b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

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 \
  -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