It used to be that Ctrl + - and Ctrl + + would increase or decrease the text size of the terminal in earlier versions of Ubuntu, which is helpful when you're giving presentations and want to show your code in a larger size. I switched to Xubuntu 12.04, and I'm missing these keyboard shortcuts.
Is there an alternative I can use? Or if not, is there a way I can define my own shortcut to replace these?
Update: Happy to report that this question is now moot for recent versions of xfce4-terminal
! See here.
Instead of relying on Python and missing modules, as in Noah K. Tilton's github solution, I drafted up a bash script that's a step closer to being more portable (at least, for installations using the most generic, default paths).
You may need to tweak the script to setup your xfce configuration path, your favourite font, etc.
Just 2 files, dropped into my home's ~/bin folder, "zoomin" and "zoomout". I didn't go further than making short commands that I can type quickly, so I don't have a clue how I'd be able to configure these scripts to respond ONLY when I'm inside of xfce4-terminal -- meaning that I gave up thinking about how to get the keybindings made for Ctrl+- and Ctrl++ because I currently only know about global keyboard bindings and didn't want to override those Keypress Combos since other applications will need them (ex: web browser, text editor).
I also thought about having "zoommin" and "zoommax", to jump to my smallest and biggest fonts when needed, typically when I need to see tons of text VS when I need to show a colleague something on my screen. I'll leave those two scripts up to your imagination on how to create :P
~/bin/zoomin
~/bin/zoomout
Update: as of this commit, resizing is now supported with Ctrl++ and Ctrl+-, which obsoletes my question.
The other answers in this thread are still valuable if you're using older versions of
xfce4-terminal
.The shortcuts you mention are for gnome-terminal, the default terminal used by gnome (and, what follows, by standard Ubuntu). XFCE, which is the main environment in Xubuntu, has its own terminal implementation. However, as far as I can tell, it is not possible in xfce4-terminal to change the font size with a shortcut (you can see the list of possible shortcuts when you go to Edit->Preferences->Shortcuts).
If you rely on this feature, you can install gnome-terminal, but since the whole point of using XFCE is often that it does not involve the somewhat heavy Gnome libraries, this might be a little unproductive.
While the rest of the answers here require you to create some type of 'hack' using custom scripts, which may or may not break when doing upgrades to your system, the actual/other answer was found in a StackOverflow question here:
Can vim zoom in and out?
By user: Chenming Zhang
Edit > Preferences > Appearance
You will see the option:
Font
Which contains both the chosen font and the size of the font-text.
I know that you are looking for a 'shortcut', but all the other options seem to require lots of customization, whereas going this route will ensure that you don't screw up your Terminal with any customizations.
This answer is also being posted here for anybody that needs an alternate option to
ctrl +-
for zooming in/out.It is possible, though not through xfce4 proper, using this workaround:
https://github.com/noah/xfce4-terminal-font
(requires python).
I use it in awesome window manager like this:
It's a bit of a hack, but it works.
The following script checks if Xfce4 Terminal is running. If it is not, the script exits. This script uses arguments,
script-name --in
to zoom in andscript-name --out
to zoom out. It will work for any font type. (Different font types have a different number of words.)I named my script terminal-zoom, and I am using Ctrl Alt + for
terminal-zoom --in
and Ctrl Alt - forterminal-zoom --out
.There are currently no zoom-shortcuts offered by xfce-term. Consider Terminator, which is lightweight on dependencies (unlike Gnome-term) and offers zoom-in and out via CTRL+SHIFT+"+"
This an old thread but was curious on how others did this. I'm using i3-wm and wrote this script to use with it
I improved it looking at the script by someone else in here