bottom right/left location calculation fixes

This commit is contained in:
Luke Smith 2019-01-05 12:02:55 -05:00
parent 64c1f26b01
commit dd4ece50d8
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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))