I have two monitors and sometimes I start to type into the wrong window.

The window with the focus is highlighted in unity (Ubuntu 16.04) with a gray shadow.

Is there a way to highlight the window with the focus even more?

Maybe with a colored border ...

Thank you very much for all answers, but ...

... they are all too complicated. Why is simple convenience stuff like this that complicated?

  • +1 While this old post had asked similar question and had been answered, I voted this question for being clear and brief; We shall expect a better answer here. – user37165 Oct 2 '16 at 5:12
  • 1
    If you don't find an answer that gives exactly what you ask - highlight active window - would you consider an alternative ? For instance a shortcut that tells you active window or top panel indicator ? – Sergiy Kolodyazhnyy Oct 3 '16 at 6:13
  • 1
    @Serg I want to see the active window in micro seconds. A love shortcuts, but here I don't want to get active to see where the focus is at the moment. – guettli Oct 3 '16 at 15:59
  • 1
    I attempted to simplify the combined solution by Serg and user.dz, then added explanation for known issues and workarounds. More details in my delayed answer below. – user37165 Oct 17 '16 at 17:31

How about changing Unity decoration shadow for active window. This just example for Ambiance theme (same for Radiance).

  1. Change directory for easy tests

    cd /usr/share/themes/Ambiance/
  2. Change decoration (example: blue color)

    sudo nano gtk-3.0/apps/unity.css

    Original black active shadow

    UnityDecoration {
        -UnityDecoration-active-shadow-color: rgba (0, 0, 0, 0.75);
        -UnityDecoration-active-shadow-radius: 30px;
        -UnityDecoration-inactive-shadow-color: rgba (0, 0, 0, 0.3);
        -UnityDecoration-inactive-shadow-radius: 25px;

    Now blue active shadow

    UnityDecoration {
        -UnityDecoration-active-shadow-color: rgba (0, 0, 255, 0.75);
        -UnityDecoration-active-shadow-radius: 30px;
        -UnityDecoration-inactive-shadow-color: rgba (0, 0, 0, 0.3);
        -UnityDecoration-inactive-shadow-radius: 25px;

    You may change size(radius) and transparency too.

  3. Logout login.

    Unity active window with highlight shadow

As Serg commented below, the above method could be fine for limited number of themes as it needs manual change for each theme. Here is a better way using Compiz.

  1. Install Compiz manager

    sudo apt-get install compizconfig-settings-manager
  2. Run it ccsm, go Ubuntu Unity Plugin → Decorations tab

  3. Check Override theme settings then change Active window shadow as you like.

    Compiz - override Unity decoration shadow

  • 1
    Good idea, thought of this myself too, but the big limitation is that this has to be done for each theme if user wishes to use something other than Ambiance. Maybe a script could do that ? – Sergiy Kolodyazhnyy Oct 3 '16 at 6:06
  • 1
    @Serg, yep . I just tested another way using compiz manager which have theme decoration override. It will override any theme. I will add in a moment. – user.dz Oct 3 '16 at 6:18
  • Awesome ! This works on my 16.04 as well. – Sergiy Kolodyazhnyy Oct 3 '16 at 6:40
  • Does this work if the window is in full screen mode? I have two monitors, both have an application in full screen mode.... – guettli Oct 3 '16 at 15:57
  • 1
    Please see my solution, I've found something that fits your requirements of full-screen windows with dual monitors. In combination with user.dz's solution, this will be perfect – Sergiy Kolodyazhnyy Oct 5 '16 at 0:29


There exists accessibility extension for compiz called ADD Helper. The basic premise of that extension is to do the opposite of what you ask - dim inactive windows, while keeping active window normal. Below is the screenshot of ADD Helper in action:

enter image description here

Notice how the window on the right is dimmed, while the one on the left remains the same level of brightness and transparency. NOTE: I have tested this with dual screen setup and having full-screen windows on both monitors. Works perfectly in each case. Combined with user.dz's solution this is perfect combination for focusing active window.

Obtaining ADD Helper:

In order to enable this plugin you will need 2 things.

  1. Enable Universe repository: ADD helper belongs to Universe repository, so make sure it is checked in Software & Updates settings:

enter image description here

  1. Update and install required packages: You will need to have Compiz Config Settings Manager and compiz-plugins-extra. Run the following command to obtain them:

    sudo bash -c 'apt-get update && apt-get install compiz-plugins-extra compizconfig-settings-manager'

Configuring ADD Helper:

  1. Find Dim Inactive under Accessibility in CompizConfig Settings Manager. Check the checkbox.

enter image description here

  1. Click on the icon to open the menu. Under Bindings tab, set your desired shortcut ( default one doesn't seem to work properly) . Personally I use Ctrl+Alt+P but feel free to choose something else.

enter image description here

  1. Under Misc. Options tab, configure the amount of brightness and opacity you wish your window to have. Check "enable on startup" checkbox so that it starts every time you login. The setup that you see in my first screenshot is as follows:

    • Brightness 45
    • Saturation 45
    • opacity 75

enter image description here

At this point you can hit the keyboard shortcut that you have set to test it or try to logout/login.

  • Working good in Ubuntu 16.04 & 14.04 – user.dz Oct 5 '16 at 12:16

This delayed answer is intended to simplify the combined solution of @Serg and @user.dz, as well as to explain known issues and the workarounds.

Combined solution simplified

Ensure that main and universe repositories have been enabled (Default). If enabled later, run update by running sudo apt-get update.

  1. Install required packages (without extra plugins)

    sudo apt-get install compizconfig-settings-manager compiz-plugins-main
  2. Run CompizConfig Settings Manager (CCSM)

  3. Enable colored window border

    In CCSM, go to Desktop > Ubuntu Unity Plugin > Decorations

    Select checkbox for option "Override Theme Settings". For better visibility and matching colour, adjust these options: "Active window shadow radius" (suggested value: 20) and "Active window shadow color" (suggested opacity: 255; hexvalue: #FF3300).

  4. Enable ADD Helper

    In CCSM, go to Accessibility > Dim Inactive > Misc. Options

    First, select checkbox for option "Enable ADD Helper on start", then select checkbox for "Enable Dim Inactive". This way, plugin will be activated immediately without using keyboard shortcut.

  5. Reload Unity (if above steps had no effect when enabled)


Known issues and workarounds

The following are known issues and workarounds that I am aware of.

Matching colour is vivid and great, but all windows are highlighted with same border colour when using window spread feature (keyboard shortcut Super+W or similar).

Proof: BEFORE - Same border colour; AFTER - Replaced with dimmed shadow

This is noticeable when using "coloured window border" only (step 3). Use ADD Helper to replace the highlighted borders for all windows with dimmed shadow (step 4). Changing the border colour may not help much, so user should use both (step 3 and 4) for best experience.

Active window works better with ADD Helper, but the dimming transition is slowing down the system on my machine.

Proof: Self-explanatory for affected users

This is easy to alleviate. In CCSM, go to Effects and deselect plugins for Animation and Fading Windows. Disabling these effects will make the system be more responsive.

Changing theme from Ambiance (default) to Radiance (alternative), vice versa, will cause coloured window border to disappear at all.

Proof: BEFORE - Coloured border shown, AFTER - Coloured border disappeared

This is likely a limitation for overriding the theme settings. The method is not persistent between changes. Therefore, after changing the theme, reload Unity (step 5) to show the coloured window border. Slower machine may need to reload Unity more than one time to take effect properly.

I had purposedly included only links to screenshots for simplicity.

Even without these screenshots, users who followed the solution will understand the issues once they start using. For users who are not having these issues, they likely have good hardware support that allows to run Unity environment without hiccups.

Tested working with Unity 7.4.0 and Compiz in Ubuntu 16.04.


The window decorations plugin in compizconfig-settings-manager (CCSM) allows you to edit the default settings for this .

sudo apt-get install compizconfig-settings-manager

To start the settings manager interface run


Scroll to the Effects section and choose Window Decoration

Enable the plugin by clicking its tickbox then adjust the Active and Inactive Shadow settings to taste. Changes should appear automatically.

Be careful about playing with anything else in CCSM until you are sure these settings are stable, its very easy to completely break your compiz installation as not all settings are compatible with each other.

  • 1
    enabling window decorator will disable unity – Anwar Sep 26 '16 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.