‘Compiz’, the window manager of Ubuntu’s Unity desktop, comes with a set of plugins that add various additional features to the window management. Though most of these do nothing but add ‘fancy effects’ (no disrespect intended 🙂 ), there are some that can be considered useful.
‘Add Helper’ for instance, is a plugin that has the ability to help you focus on the currently selected application window by dimming-out other, inactive/non-selected windows (somewhat similar to the popular ‘Turn Off the Lights’ web browser extension). This plugin however, cannot dim out the ‘Application Launcher’ or the ‘Top Panel’, though you can set it to dim out the desktop background which is pretty handy.
Installing and configuring it on Ubuntu is easy. If you prefer a GUI, then you can use the ‘CompizConfig Settings Manager’, or, since one can easily break his/her desktop when using this utility (as it gives you access to a wide range of ‘tweaks’), you achieve the same using the command-line too. I will add both methods anyway.
Open your Terminal window and enter the below command to install the plugin (this plugin is actually comes with a package called ‘compiz-plugins-extra’ that includes few others as well).
sudo apt-get install compiz-plugins-extra
Command-line Based Method …
Before begin, I assume that you have not installed any plugins manually into Unity because if you have, issuing the below command will disable them. If you have existing (manually installed) plugins, then please use the graphical method below instead. Also, right down the below command in a piece of paper (just in case).
Also remember that I do not know for sure whether the command-line method is going to work on other versions of Ubuntu as I have only tested it on Ubuntu 13.10. The graphical method on the other hand should work just fine.
Enter the below command to your Terminal window (this will load the plugin into ‘Compiz’).
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ active-plugins "['core', 'composite', 'opengl', 'decor', 'regex', 'grid', 'copytex', 'commands', 'compiztoolbox', 'place', 'imgpng', 'resize', 'move', 'gnomecompat', 'session', 'animation', 'vpswitch', 'mousepoll', 'snap', 'wall', 'unitymtgrabhandles', 'expo', 'ezoom', 'workarounds', 'fade', 'scale', 'addhelper', 'unityshell']"
If after entering this command ‘Application Launcher’ seems to be missing a few icons or just start to have some issues, then enter the command that you just wrote down into the Terminal and everything should be fine.
Then enter the below command.
gsettings set org.compiz.addhelper:/org/compiz/profiles/unity/plugins/addhelper/ toggle-key "'<Control><Alt><p>'"
This command defines a combined keyboard shortcut (Ctrl + Alt + p) for enabling/disabling ‘Add Helper’ on-the-fly. I prefer to enable/disable it whenever I want rather than to have it running upon the desktop loading, because sometimes it can be a bit of a headache to have it enabled all the time.
If you prefer to have it enabled upon desktop loading, then enter the below command.
gsettings set org.compiz.addhelper:/org/compiz/profiles/unity/plugins/addhelper/ ononinit true
That is it!.
You can also change the Brightness, Saturation, Opacity & include/exclude applications windows, desktop … from being dimmed out. To change Brightness, Saturation and Opacity, you can use it in the below format.
gsettings set org.compiz.addhelper:/org/compiz/profiles/unity/plugins/addhelper/ brightness "0"
As highlighted, replace ‘brightness‘ with ‘saturation’ or ‘opacity’ and the number (which represents their intensity of course) accordingly.
You can also tell ‘Add Helper’ to dim-out the desktop too. For that, enter the below command (again, both the ‘Application Launcher’ and ‘Top Panel’ will still be visible).
gsettings set org.compiz.addhelper:/org/compiz/profiles/unity/plugins/addhelper/ window-types "Toolbar | Utility | Dialog | ModalDialog | Fullscreen | Normal| Desktop"
If you run into problems, then reenter the same command after removing |Desktop argument.
Graphical Method …
After installing the ‘compiz-plugins-extra’ package as showed in the ‘Step 1’, enter the below command to install ‘CompizConfig Settings Manager’.
sudo apt-get install compizconfig-settings-manager
Now open it and search for ‘dim inactive’ term. Then put a ‘check-mark’ on the ‘Dim Inactive’ icon (shown below).
Just like with the above command-line method, you can use this window to configure the default keyboard combination, enable it upon desktop loading and change the Brightness etc as well.
Is it stable ?
As mentioned earlier, one has to be careful while ‘playing’ with these plugins as they are known to make the life of the window manager difficult (some are of severe nature, somewhat), as such, after enabling and running for a while my Unity desktop crashed twice. However, I have been constantly tweaking this and that (in both CCSM and command-line), so it was probably my fault.
In any case, if you run into problems (unless you know your way around the command-line, you might have to forcefully reboot the computer), then you can pretty easily disable it using the GUI tool (just remove the ‘check-mark’ under ‘Dim Inactive’ button). If you prefer the command-line, then enter the below command.
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ active-plugins "['core', 'composite', 'opengl', 'decor', 'regex', 'grid', 'copytex', 'commands', 'compiztoolbox', 'place', 'imgpng', 'resize', 'move', 'gnomecompat', 'session', 'animation', 'vpswitch', 'mousepoll', 'snap', 'wall', 'unitymtgrabhandles', 'expo', 'ezoom', 'workarounds', 'fade', 'scale', 'unityshell']"