Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gnome-terminal font resize (zoom in, zoom out), but adjust terminal height and width contrariwise for getting a "lock in" of window dimensions

I like the zoom keys (control-+ and control--) a lot in Ubuntu 13.04's gnome-terminal, but the when zooming in, the terminal screen gets wider, too (and the opposite when zooming out)

Is there a way to keep the window's pixel dimensions approximately constant, while zooming font-size in and out (that means, the inside terminal characters height and width dimensions have to shrink and grow accordingly)?

The aimed behaviour is partly implemented already, in case the window has reached the maximum screen size, than it does a kind of "lock in place" and works as I would like have it working in cases where the window is not yet maximized....

When I remember, in older versions of Ubuntu, I've had this behaviour already (but I am not sure any more).

Any ideas? Thank You for helping.

like image 364
Hartmut Pfarr Avatar asked Aug 04 '13 14:08

Hartmut Pfarr


2 Answers

The Konsole Terminal (http://konsole.kde.org) from KDE has that feature.

I run GNOME 3.8.4 but use konsole as my primary terminal (for that reason actually).

Edit: Over seven years later, I run GNOME 40 and still use konsole for the zoom feature.

like image 104
Steven Avatar answered Dec 27 '22 00:12

Steven


I can’t tell you for sure, but since this is GNOME and moreover GNOME 3, it’s unlikely that the Terminal has this kind of customization built-in.

But in Linux, you can always improvise. How about the following.

  1. Find a program that can send keys to an X11 window. Maybe xdotool.
  2. Find a program that can control an X11 window’s geometry. Maybe xdotool.
  3. Write a short script that locates the terminal window (probably just the focused one), sends it Ctrl-Plus / Ctrl-Minus, waits a tiny bit, then sets its geometry to the one you like (or to whatever it was initially, which you can also query with xdotool).
  4. Bind this script to a keyboard shortcut of your choice, say Win+Plus / Win+Minus. No idea how to do this in modern Ubuntu / GNOME 3, but GNOME 2’s Metacity used to have GConf keys for user-defined shortcuts.
like image 39
Vasiliy Faronov Avatar answered Dec 26 '22 23:12

Vasiliy Faronov