jordansissel / xdotool

fake keyboard/mouse input, window management, and more
Other
3.27k stars 321 forks source link

windowsize and windowmove are incorrect when no title bar is present #465

Open ddouglas87 opened 3 months ago

ddouglas87 commented 3 months ago

Most of the programs I use do not have the title bar, either by default or configured this way. The most common program to do this is Chrome.

If I key bind xdotool getactivewindow windowmove x 0 windowsize x 100% then run it on Chrome this is what it looks like: chrome

In comparison here's what it looks like in Firefox: firefox

If I try to amend this with the command xdotool getactivewindow windowmove x -45 windowsize x 100% I get this:

chrome2 firefox2

If I go over 100% the window jumps to my second monitor. This is because I have a dual monitor setup and the second monitor has no taskbar which gives it a taller height. When windowsize is set larger than the first monitor it jumps to the second monitor.

FascinatedBox commented 1 month ago

I think this is a duplicate of 381 (not linking the issue to avoid pinging the original author). This happens because xdotool isn't using a gravity. I have a fork of this repository ( https://github.com/fascinatedbox/boxdotool ) which has a --gravity option you can use. If you decide to use it, you want --gravity static. That should fix what you're encountering.