From 5d08815c0e327ac0b728332c642cd94e76582a71 Mon Sep 17 00:00:00 2001 From: Wryn Wagner Date: Fri, 24 Sep 2021 11:20:44 -0600 Subject: [PATCH] Centering issue on multiple monitors --- bin/desktop/i3/launch-or-show-application.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/desktop/i3/launch-or-show-application.sh b/bin/desktop/i3/launch-or-show-application.sh index cc98fd5..58f72f3 100755 --- a/bin/desktop/i3/launch-or-show-application.sh +++ b/bin/desktop/i3/launch-or-show-application.sh @@ -21,12 +21,10 @@ SCREEN_SIZE=$(\ | grep 'connected primary' \ | sed 's/.*connected primary \([^x]*\)x\([^+]*\).*/\1 \2/' \ | 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] move absolute position center" i3-msg "[class=$CLIENT_CLASS] move scratchpad" i3-msg "[class=$CLIENT_CLASS] scratchpad show" +i3-msg "[class=$CLIENT_CLASS] move position center"