I like having a small terminal for small things (80 x 24), and a big terminal for editing code in vim and such (120 x 38), and sometimes even going full screen, browsing ascci art? I dunno.
Anywho, is there a terminal command that I can use to toggle window sizes for my terminal?
Yes.
resize -s <rows> <columns>
works with Ubuntu's default terminal application (gnome-terminal
).How to resize the terminal until a program is finished
To get a nice effect of having, say,
vim
in a specially-sized window only while it's running:mkdir ~/bin
~/.profile
by default adds~/bin
to thePATH
; For now, you can eithersource ~/.profile
or declare the newPATH
yourself:export PATH="$PATH":~/bin
vim ~/bin/vim
Add the following:
Save
chmod +x ~/bin/vim
Now
vim
will run at size 120×38 and the resizing will be undone whenvim
finishes.In Ubuntu 16.10 (and maybe older versions too), if you open a terminal window, and go to the
Terminal
menu, you can select alternate window sizes directly. In fact, almost exactly the sizes that you are asking for!Also,
F11
will toggle full screen mode.You can also create multiple profiles that set the screen to exactly the size(s) that you want. Go to the
File
menu and chooseNew Profile
... call it "My editing profile". Then, when you want to change to a different profile, go to theTerminal
menu and chooseChange Profile
. Then go to theEdit
menu and chooseProfile Perferences
. Set your custom screen size there. Different profiles, each with different screen sizes!