From dd4ece50d833ffe04b655ea5546142e2d1520d45 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 5 Jan 2019 12:02:55 -0500 Subject: [PATCH] bottom right/left location calculation fixes --- .scripts/i3cmds/bottomleft | 4 ++-- .scripts/i3cmds/bottomright | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.scripts/i3cmds/bottomleft b/.scripts/i3cmds/bottomleft index be12b63..c73a59a 100755 --- a/.scripts/i3cmds/bottomleft +++ b/.scripts/i3cmds/bottomleft @@ -8,9 +8,9 @@ current=$(xdotool getwindowfocus) newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3)) newheight=$(($(xdotool getdisplaygeometry | awk '{print $1}') / 3)) -xdotool windowsize "$(xdotool getwindowfocus)" $newheight $newwidth +xdotool windowsize "$current" $newheight $newwidth -newsize=$(xdotool getwindowgeometry "$(xdotool getwindowfocus)" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') +newsize=$(xdotool getwindowgeometry "$current" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') height=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) xdotool windowmove "$current" 0 $height diff --git a/.scripts/i3cmds/bottomright b/.scripts/i3cmds/bottomright index 7ddc253..45e46bf 100755 --- a/.scripts/i3cmds/bottomright +++ b/.scripts/i3cmds/bottomright @@ -8,10 +8,10 @@ current=$(xdotool getwindowfocus) newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3)) newheight=$(($(xdotool getdisplaygeometry | awk '{print $1}') / 3)) -xdotool windowsize "$(xdotool getwindowfocus)" $newheight $newwidth +xdotool windowsize "$current" $newheight $newwidth -newsize=$(xdotool getwindowgeometry "$(xdotool getwindowfocus)" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') -newwidth=$(xdotool getwindowgeometry "$(xdotool getwindowfocus)" | grep Geometry | grep -o " [0-9]*") +newsize=$(xdotool getwindowgeometry "$current" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') +newwidth=$(xdotool getwindowgeometry "$current" | grep Geometry | grep -o " [0-9]*") vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) horizontal=$(($(xdotool getdisplaygeometry | awk '{print $1}') - newwidth))