Linux - Use a Specific Corner of a Window as the Transformation Point?

104 views Asked by At


# xdotool --version
xdotool version 2.20110530.1
# wmctrl --version
1.07
# bash --version
GNU bash, version 4.1.10(1)-release (i586-suse-linux-gnu)

I have been playing around with the Commands wmctrl and xdotool for rearranging/moving windows around the desktop. And I was wondering if it's possible to use, for example, the bottom-left Corner as the transformation point for where I want that point to end up..?

For example, if wanted to move the current window to point 100,1000 (*i.e. X-Axis=100 and Y-Axis=1000), but instead of using the top-left corner as the point that will end-up at 100,1000, I want to use current window's Bottom-Left corner instead...

Is this possible to specify this with either of these commands?

I know I could probably do this with some math equations by getting the geometry of the window and then subtract or add the height of the window (*i.e. the y-axis) from the coordinate, in order to modify where the top-left corner would be, in essence putting the bottom-left corner where I want it. But in actuality I'm moving the top-left corner, but making it seem like I'm moving it using the bottom-left corner instead.

I know this isn't the same thing, but I saw you can use the "--polar" option (*moving with degrees instead of px) with the "--window" option to use the center of the window as the point of origin... But, nothing to really specify a different corner as the transformation point...

Or maybe there is another command other then the wmctrl or xdotool command to accomplish this...

Any thoughts or suggestions would be greatly appreciated!

Thanks in Advance,
Matt

0

There are 0 answers