Centering issue on multiple monitors

This commit is contained in:
Wryn Wagner 2021-09-24 11:20:44 -06:00
parent a7e339a50d
commit 5d08815c0e

View File

@ -21,12 +21,10 @@ SCREEN_SIZE=$(\
| grep 'connected primary' \ | grep 'connected primary' \
| sed 's/.*connected primary \([^x]*\)x\([^+]*\).*/\1 \2/' \ | sed 's/.*connected primary \([^x]*\)x\([^+]*\).*/\1 \2/' \
| awk -v f=$FACTOR -v x=$XFFSET -v y=$YFFSET \ | awk -v f=$FACTOR -v x=$XFFSET -v y=$YFFSET \
'{print ($1*f+x)," ",($2*f+y);}'\ '{print int($1*f+x)," ",int($2*f+y);}'\
) )
i3-msg "[class=$CLIENT_CLASS] resize set $SCREEN_SIZE" i3-msg "[class=$CLIENT_CLASS] resize set $SCREEN_SIZE"
i3-msg "[class=$CLIENT_CLASS] move absolute position center"
i3-msg "[class=$CLIENT_CLASS] move scratchpad" i3-msg "[class=$CLIENT_CLASS] move scratchpad"
i3-msg "[class=$CLIENT_CLASS] scratchpad show" i3-msg "[class=$CLIENT_CLASS] scratchpad show"
i3-msg "[class=$CLIENT_CLASS] move position center"