blob: 96c1757e41f2388af63b19928568ed73a9c245d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/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" * 30" | bc -l)
convert "$1" -resize "$horizontal"x"$vertical"^ -gravity center \
-extent "$horizontal"x"$vertical" ~/.config/lockwall.png
convert ~/.config/lockwall.png \
-channel rgb \
-brightness-contrast -20,-20 \
+channel \
-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
|