For some reason, I wish to resize a window to a very large size, 4-5 times larger than my screen size. For now, I am doing it manually by moving the entire window but one corner out of the screen and then pulling the corner to expand the window. However, this is very time taking. Is there some way to resize the window to a particular height and width instantly ? (perhaps from commandline or with the help of some small app or something else)
Asked
Active
Viewed 2.4k times
1 Answers
42
I propose two solutions
wmctrl
Install the wmctrl package, then you can resize your window with
wmctrl -r string -e 0,left,up,width,height
where string is a substring of the window's title, (left,up) are the desired screen coordinates of the upper left window's corner, and (width,height) are the desired window's dimensions.
For a more precise window's choice, run wmctrl -l, which will give you a list of records containing window's ID, screen's number and window's title. Then you can resize a particular window by ID with
wmctrl -i -r ID -e 0,left,up,width,height
More information in wmctrl man page.
devilspie
Install the package devilspie, then create the folder ~/.devilspie and a file my-name.ds in this folder, with content:
(if (is (window_name) "My Window") (geometry "widthxheight+left+up"))
then execute devilspie to resize your window.