How can I change the size of an x11 window with a script, be it AppleScript or otherwise. I have a process running using wine which is using XQuartz as the windowing system and I want to force the x11 window to a particular size.
1 Answer
You can install Homebrew and use it to install wmctrl using the following command:
brew install wmctrl
Then run wmctrl like this:
wmctrl -l
It should give you a list of all the available windows on screen. Take the ID for the game window and run:
wmctrl -i -r windowid -e 0,0,0,1600,1200
where windowid should be replaced with the ID of that window.
Note: I don't think your mission is likely to succeed, as most programs that do not offer resize handles are not able to handle resizing their windows at all. You'll probably end up with the contents being the same size as always, and then just a white/black color for the rest of the enlarged window. But it is worth a try!
-
I did indeed get the white/black colour background. The game has a fullscreen option though so I'm stumped as to why I cannot trick it to think that fullscreen is "x,y" dimensions.– tsujpCommented Mar 9, 2019 at 8:54
-
Depending on exactly how they have chosen to implement fullscreen it might be possible - but in general games tend to have this not-so-flexible system. The game might offer an in-game options screen to decide which resolution to have in full screen? I guess you have already tried that. Commented Mar 9, 2019 at 10:08
xterm -geometry 72x35 ...
?-geometry
.