So that I could resize the window to a certain size from within Terminal.
Yes. Terminal supports escape sequences for manipulating windows, including the size and position, layering, and minimizing. Dimensions can be expressed in pixels or characters. See Xterm Control Sequences for details (search for “Window manipulation”; if you’re not familiar with the notation, “CSI” stands for “Control Sequence Introducer”, which is
For example, this shell command will set the window to 100x50 characters:
Minimize the window for a few seconds, then restore it:
printf '\e[2t' && sleep 3 && printf '\e[1t'
Move the window to the top/left corner of the display:
Zoom the window:
Bring the window to the front (without changing keyboard focus):
Enabling the Control Sequences in Terminal Emulators
Some terminal emulators ignore these control sequences by default and require configuration to enable them.
To enable these in XTerm, set the following resource to true:
To enable these in iTerm2, deselect the following preference:
Preferences > Profiles > [profile] > Terminal > Disable session-initiated window resizing
Actually you know, moving an resizing windows with a mouse is horribly slow.
I've been using this app SizeUp for a very long time now. It basically resizes any application window by using your keyboard command.
You can do the following (my custom keyboard commands below):
- make the window full screen (control + option + command + m)
- move a window 1/2 screen size to the left or right (control + option + command + ←/→ )
- move a window 1/4 screen size to any corner (control + option + shift + ←/→/↑/↓)
- move windows between screens
- move windows between spaces
I think this might do the trick and also help with other window management.