Improve visual difference between active and inactive windows

Even under optimal conditions the visual difference between active an inactive windows in Gnome/GTK is quite minimal.

Depending on lighting conditions (bright environment) and/or hardware setup (poor notebook display with reduced brightness) identifying the currently active window is quite hard for me.

This is especially difficult when there are multiple windows of the same application visible on the same virtual desktop at the same time which - at least for me - happens quite often with terminal or file manager windows.

Is there any way to better highlight the currently active window?

Demo screenshot:

Searching the forum this question seems to come up from time to time without a real answer. Two examples are Enhance visibility of active window and Accent color for active window.

Any help would be appreciated!

2 Likes

Hi,

Windows 10/11 has an option to draw a window border using the accent color. That helps a lot, so I tweaked gtk to do the same with the user CSS:

/* $HOME/.config/gtk-4.0/gtk.css */

window.background.csd:not(.maximized) {
	border: 1px solid alpha(@theme_fg_color, .125);
}

window.background.csd:not(.maximized):focus-within {
	border: 1px solid @theme_selected_bg_color;
}
3 Likes

Your approach works great for GTK4 applications and hence solves the issue for terminal and file manager which already helps a lot. Thanks for the quick response!

After some more searching it seems that achieving the same behavior for non-GTK applications as well is not possible using CSS alone but instead requires an extension. Highlight Focus - GNOME Shell Extensions seems to do the job fine for most applications I tested so far.

I absolutely agree. The optical difference between active window and inactive windows should be much better. There should not only be the difference between grey and white icons, but also the titlebar-tint.

And an additional option for an accent-color-frame around the window to make it even more recognizable, would make it perfect. But even without an accent-color-frame around the window, it should clearly be distinguished from the inactive windows.