Change the size of OS X terminal using keyboard

When typing in a terminal on OS X, I'd like a way to resize the window I'm typing in without taking my hands off the keyboard. Is there an easy way to do this? If not, any ideas for hacks?


Solution 1:

You might use Slate to configure keyboard shortcuts for resizing and moving windows:

bind right:ctrl,alt resize +50 0
bind left:ctrl,alt resize -50 0
bind up:ctrl,alt resize 0 -50
bind down:ctrl,alt resize 0 +50

You might also use xterm control sequences:

printf '\e[8;24;80t' # resize to 80x24
printf '\e[3;0;0t' # move to top left corner
printf '\e[9;1t' # maximize
printf '\e[9;2t' # maximize vertically
printf '\e[9;3t' # maximize horizontally

or AppleScript:

osascript -e 'tell app "Terminal" to tell window 1' -e 'set b to bounds' -e 'set item 3 of b to (item 1 of b)+500' -e 'set bounds to b' -e end

Solution 2:

Command+ will make the window and the text larger, that's about as good as you're going to get from the keyboard.