fudged the x position to make it work properly cuz whatever
This commit is contained in:
parent
2e5e27da0a
commit
bdc22c8ac2
@ -2,15 +2,16 @@
|
|||||||
|
|
||||||
set -ueo pipefail
|
set -ueo pipefail
|
||||||
|
|
||||||
# assuming that all display's are the same width
|
# assuming that all displays are the same width
|
||||||
displayWidth=$(xdotool getdisplaygeometry | cut -d' ' -f1)
|
displayWidth=$(xdotool getdisplaygeometry | cut -d' ' -f1)
|
||||||
|
|
||||||
xPos=$(xdotool getactivewindow getwindowgeometry | grep Position: | cut -d: -f2 | cut -d, -f1 | tr -d ' ')
|
xPos=$(xdotool getactivewindow getwindowgeometry | grep Position: | cut -d: -f2 | cut -d, -f1 | tr -d ' ')
|
||||||
newXPos=
|
|
||||||
|
# don't ask questions about magic numbers
|
||||||
if [[ "${xPos}" -ge "${displayWidth}" ]]; then
|
if [[ "${xPos}" -ge "${displayWidth}" ]]; then
|
||||||
newXPos="-${displayWidth}"
|
newXPos="-$((displayWidth + 3))"
|
||||||
else
|
else
|
||||||
newXPos="${displayWidth}"
|
newXPos="$((displayWidth - 5))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# i don't know why the y value is offset, but it is what it is
|
# i don't know why the y value is offset, but it is what it is
|
||||||
|
Loading…
Reference in New Issue
Block a user