Compiz for eye candy AND productivity - Quake style terminal
noorbeast — Sat, 2010-06-26 21:41
Compiz is often regarded as just 'EyeCandy'. But Compiz can do so much more! Here is a guide to creating my Compiz Quake style animated terminal:
As a basic introduction to using compiz to control a terminal, I have used the following, but I have chosen some slightly different options plus more advanced control, based on style in terms of decoration, and controlling size and position. The following outlines how compiz can be used to create a transparent terminal, but you can do the same thing just using wmctrl, without compiz, as an alternative, if you want: http://www.ubuntu-unleashed.com/2007/08/howto-completely-transparent-she...
My setup is a tad more complicated than a simple transparent terminal embedded in your desktop. To create your personal quake style terminator terminal you will need to install the following: sudo apt-get install compizconfig-settings-manager terminator wmctrl
Next, I created a new gnome-terminal profile called trans, as per the web link, and modified the transparency level, font and cursor settings to my liking.
I then created a script for launching Terminator as follows, which specifies the trans profile and sets the title, which is really important, as the title is used to control the shading of that window:
#!/bin/bash
terminator -p trans -T trans
I add a menu entry for executing this script called Quake Terminator, as kupfer, the launcher I use, will automatically find it.
As an aside, my reason for using terminator is that it can be split into multiple terminals. The basic short cuts are Ctrl+Shift+O to do a horizontal split, Ctrl+Shift+E to do a vertical split. To navigate between the split windows you use Ctrl+Shift+P to go to the previous instance and Ctrl+Shift+N to go to the next terminal instance within terminator.
I set the following in ~/.config/terminator/config:
enable_real_transparency=True
borderless=False
fullscreen=False
scrollbar_position=disabled
titlebars=false
Next I create 2 files to manage the toggle function, which in my case I put in the ~/Template folder. The first is called ToggleShade and contains the following:
#!/bin/sh
# Unshade and bring to front
if [ -f ~/Templates/.quake.shaded ]; then
wmctrl -r 'trans' -b remove,below
wmctrl -r 'trans' -b remove,shaded
rm ~/Templates/.quake.shaded
# Shade and send to back
else
wmctrl -r 'trans' -b add,shaded
wmctrl -r 'trans' -b add,below
touch ~/Templates/.quake.shaded
fi
The second is called ToggleUnShade, which I add as an entry to my auto start applications via Menu->System->Preferences->Startup Programs
#!/bin/sh
# Unshade and bring to front
if [ -f ~/Templates/.quake.shaded ]; then
wmctrl -r 'trans' -b remove,below
wmctrl -r 'trans' -b remove,shaded
rm ~/Templates/.quake.shaded
# Shade and send to back
else
wmctrl -r 'trans' -b add,shaded
wmctrl -r 'trans' -b add,below
touch ~/Templates/.quake.shaded
fi
I then use CompizConfig Settings Manager to controle the shade animation, position and size of the window. You can also use it to manage the decoration.
Under the Animations pluging there is a Shade Animation tab, where I set the following: Shade Effect Curved Fold, duration 300, Window Match (type=Normal | Dialog | ModalDialog | Utility | Unknown)
If you want to remove decorations, though I don't, start Quake Terminator from the menu entry created earlier and use the Windows Decoration plugin. Select the + button from the Decorations Windows field and select Type=Title and check the Invert box. Select Grab from the value then click on the Quake Terminal to select it. Finish by selecting Add.
The Place Windows plug in is used to set the postion and the Window Rules plugin is used to do things such as skip the taskbar and skip pager, under the Matches tab, and to set the window size under the Size Rules tab.
Last but not least, I set a custom shortcut, in my case WindowsKey+z, to trigger the fold action, which is done via Menu->System->Preferences->Keyboard Shortcuts
It may sound a little complicated at first, and mine is a bit of a complicated example, but controlling windows/applications with compiz is actually pretty easy and is a point and click affair.