So I’ve been happy with the Xfce4 distribution’s terminal emulator (0.4.8) for a long time, but recently I have been dishing hate on PuTTy (for the Windows systems that I utilize) and realized that I should probably re-visit my Ubuntu rig’s choice of terminal to make my life much more pleasant!
After some web surfing, I decided to give Guake a try. It’s much more aesthetically pleasing (transparent!) and much more functional for me as a drop-down terminal.
My User Story
Hitherto, I have used Sublime Text 2 to launch terminals in project directories (with project virtual environments loaded) using
Ctrl+Shift+Z – but this often resulted in multiple shell windows when I would click the hotkey to open a terminal rather than reusing an existing window. Further, when I did choose to cycle windows, I often had to
Alt+Tab through several other programs and/or terminals.
Obviously, a tabbed terminal emulator would make sense. While Xfce4 Terminal supports tabs, Guake takes first place for its toggability (
F12 by default – since bound to
F1) and drop-down overlay. Sublime Text 2 took some additional tweaking to play nice with Guake.
Installation (Ubuntu 12.04 with Xfce4 desktop)
1 2 3 4 5 6 7 8
Guake may require a reboot before it runs. You should see it in your system tray. You can also identify it as the default terminate in Preferred Applications, accessed via the GNOME Settings Manager.
From the screenshot album below, you can see a few of the tweaks I made.
- ✔ Hide on lose focus
- ✘ Show tab bar
- ✘ Show scrollbar
- Drop-down height @ ~40%
- Transparency @ ~15%
- ✔ Use the system fixed width font
- Configured elsewhere as Droid Sans
- Various key bindings
F1Toggle Guake visibility
F12Toggle Fullscreen terminal
Shift+Ctrl+WClose tab (
Shift+Ctrl+BGo to previous tab
Shift+Ctrl+FGo to next tab
Enabling transparency (compositing)
Ubuntu users must ensure that display compositing is enabled before the transparency effect will work for their terminal. The image at right shows the relevant setting, Enable display compositing, in Windows Manager Tweaks accessed through the GNOME Settings Manager.
You may also need to postpone the autostart script for Guake if it is loading before Compiz can enable transparency. I wrote this short autostart script
guake-start.sh which should be added to the Session & Startup settings manager in GNOME (by right-clicking the list in image at right and selecting Add from context menu).
Playing with Sublime Text 2
If you’re hoping to use this new sexy terminal with Sublime Text 2, you’re out of luck with the existing Sublime Terminal package. It will indeed open the Guake terminal if you have already designated Guake as your system default (e.g. preferred application) – but it will not open new tabs or change directory and will merely open Guake to your existing shell session.
(The Terminal package does allow user-defined parameters, but I wasn’t able to fudge enough commands together to successfully have Guake open a new tab – you’ll see my own hack required some special logic exceeding mere parameters.)
I routinely hack various packages to add additional functionality. Here is a code snippet you may use in your Sublime Terminal package’s
Terminal.py to add this useabity:
Ctrl+Shift+TOpen Guake terminal
Ctrl+Shift+Alt+TOpen Guake terminal at project directory
Remember that you already have toggle functionality for accessing an existing drop-down shell using
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80