What keyboard shortcut changes the `xfce4-terminal` terminal text size?

Solution 1:

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/bash
SIZE=`grep 'FontName' ~/.config/xfce4/terminal/terminalrc | cut -d' ' -f 2`
NEWSIZE=$((SIZE + 2))
REGEXPR='s/FontName.*/FontName=Monospace '$NEWSIZE'/g'
sed -i "$REGEXPR" ~/.config/xfce4/terminal/terminalrc

~/bin/zoomout

#!/bin/bash
SIZE=`grep 'FontName' ~/.config/xfce4/terminal/terminalrc | cut -d' ' -f 2`
NEWSIZE=$((SIZE - 2))
REGEXPR='s/FontName.*/FontName=Monospace '$NEWSIZE'/g'
sed -i "$REGEXPR" ~/.config/xfce4/terminal/terminalrc

Solution 2:

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.

Solution 3:

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.