summaryrefslogtreecommitdiffstats
path: root/.config/i3
diff options
context:
space:
mode:
authorfuryan <mrchristenson@gmail.com>2018-07-05 13:30:55 +0200
committerfuryan <mrchristenson@gmail.com>2018-07-05 13:32:19 +0200
commitd4f4c24071e997ed6587f9b959644a56ff50cd77 (patch)
tree574053d9e6f7fc47fd721afbf14dc8892ee5761d /.config/i3
parenta105dd3e907f7452eab234673e9960b1cdb47b81 (diff)
downloadeibhear-d4f4c24071e997ed6587f9b959644a56ff50cd77.tar.gz
eibhear-d4f4c24071e997ed6587f9b959644a56ff50cd77.tar.zst
eibhear-d4f4c24071e997ed6587f9b959644a56ff50cd77.zip
Fixing script for multimonitor after learning more about imagemagick and testing.
Diffstat (limited to '.config/i3')
-rwxr-xr-x.config/i3/lock.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/.config/i3/lock.sh b/.config/i3/lock.sh
index 92da398..f154487 100755
--- a/.config/i3/lock.sh
+++ b/.config/i3/lock.sh
@@ -7,11 +7,15 @@ timeout="10000"
scrot -m -z /tmp/lock.png
xdpyinfo -ext XINERAMA | sed '/^ head #/!d;s///' |
{
- cmd="convert"
+ cmd="convert /tmp/lock.png"
+ cmdend=""
while IFS=' :x@,' read i w h x y; do
- cmd+=" /tmp/lock.png -paint 1 -swirl 360 -crop ${w}x$h+$x+$y -geometry ${w}x$h+$x+$y ~/.config/i3/lock.png -gravity center -composite -matte"
+ cmd+=" -region ${w}x$h+$x+$y -paint 1 -swirl 360"
+ xc=$((x+(w/2)-79))
+ yc=$((y+(h/2)-79))
+ cmdend+=" ~/.config/i3/lock.png -geometry +${xc}+${yc} -composite -matte"
done
- cmd+=" /tmp/screen.png"
+ cmd+="${cmdend} /tmp/screen.png"
eval $cmd
}