Disable window dimming when focus is lost

Hi, I have a problem with what seems to be a feature, and I'd like to disable it.

When I use multiple windows (terminal windows for example), when a window loses focus it dims, making it difficult to read text. I use multiple monitors, and I'd like to be able to read text from multiple windows at the same time without straining my eyes. Is there a way to disable this dim-on-lost-focus feature?

I believe that the effect you are describing is based on the Zorin Theme you are using. Changing to a theme that does not dim inactive windows may work.
Otherwise, we may need to assist you in setting up a custom gtk.css file in ~/.config/gtk-3.0/
You can set the window:backdrop property to use the same background color and text color as the active window.
For example, in Zorin-Blue-Light theme, the active window is:

.background { color: #123354; background-color: #f5f7fa; }

But the inactive window is:

.background:backdrop { color: #828282; background-color: #f8f8f8; }

Putting

.background:backdrop { color: #123354; background-color: #f5f7fa; }

into ~/.config/gtk-3.0/gtk.css and saving it, then logging out and back in again should prevent that Dimming Effect that you describe.

Unfortunately it didn't work. Are there any other steps that need to be done?

redacted@redacted-lap:~$ gsettings get org.gnome.desktop.interface gtk-theme
'ZorinBlue-Dark'
redacted@redacted-lap:~$ cat ~/.config/gtk-3.0/gtk.css 
.background:backdrop { color: #bde6fb; background-color: #1e2529; }
redacted@redacted-lap:~$

Can you try

sudo nano ~/.config/gtk-3.0/gtk.css

Then paste it in?

Please give us more system information so we can help you.

Im very intrested because will disabling dimming also disable dimming of the system title bar? I remember in KDE there is a toggle to disable dimming of the window but you can leave the title bar dimmed when losing focus vice versa, you can even disable dimming.

Since i'm spoiled by KDE's settings I don't know I can help much but I can try I guess.

I just tested this twice, with different variables. Then tested it on a copy of "Try Zorin".
It worked each time... I am not sure what is causing it not to on yours...

I wonder if you are testing it in a Flatpak application that is referencing the Flatpak Zorin themes- that is the only thing I can think of that may interfere.

The same method as above should work:

.selection-mode .titlebar:backdrop:not(headerbar), .titlebar:backdrop:not(headerbar), headerbar:backdrop { background-color: #1a2022; background-image: none; }

Replace #1a2022 with the color you want.

1 Like

He using another theme, he didn't give us any system information at all?

He showed the contents of the file with cat ~/.config/gtk-3.0/gtk.css...

1 Like

Ow welp, is it a part of the theme or gnome?

Theme. I tested it... Plus I recall another member had the same question about a month and a half ago and we performed the same solution, successfully, then.

1 Like

Ok imma try it and try to understand it, im gonna try it on my other computer which is collecting dust anyway. I will give more feedback afterwards.

1 Like

I found a solution

Yes, that also would work.

The gtk.css file placed in ~/.config/gtk-3.0 gets First Priority.
Then, the gtk.css file placed in either ~/.themes or ~/.local/share/themes gets next priority.

That is partly why I prefer edits to be made to ~/.config/gtk-3.0/gtk.css while the other reason is because edits are more easily altered or undone in ~/.config/gtk-3.0/gtk.css than they are in the Main Theme. What if you do not remember the Original parameters of the Original Theme, but it is already changed and saved?

Sometimes the accents still dim tho. I need to dig deeper in the css file. I will see what makes the shadows disappear.

U could make a backup, copy the file and rename it then save it in home folder.

1 Like

Absolutely.

ctrl+F, then search for everything that has the property :backdrop
Compare the backdrop items to the non-backdrop and you can recolor all :backdrop'ed properties to match the class that is not backdropped.
(Be wary that not all items that have a backdrop property should be changed. Read what you are changing. Use the back-up copy to restore mistakes).

1 Like

Nothing I tried seems to change anything.

Current system state:

redacted@redacted-lap:~$ uname -a
Linux redacted-lap 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
redacted@redacted-lap:~$ cat /etc/issue.net 
Zorin OS 16
redacted@redacted-lap:~$ gsettings get org.gnome.desktop.interface gtk-theme
'ZorinBlue-Dark'
redacted@redacted-lap:~$ cat /home/redacted/.config/gtk-3.0/gtk.css 
.background:backdrop { color: #bde6fb; background-color: #1e2529; }
redacted@redacted-lap:~$ cat /usr/share/themes/ZorinBlue-Dark/gtk-3.0/gtk.css | grep .background:backdrop 
.background:backdrop { color: #6f828a; background-color: #1a2022; text-shadow: none; -gtk-icon-shadow: none; }
/* I manually inserted the following .background:backdrop  */
.background:backdrop { color: #bde6fb; background-color: #1e2529; }
popover.background:backdrop { background-color: #14191a; box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.4); border-color: rgba(40, 48, 51, 0.75); }
redacted@redacted-lap:~$ 

The system was freshly installed about a week ago, and wasn't customised at all (except for the changed theme to dark in Zorin Appearance app). Is there any other information I can provide?

Thank you all!

Can you post screenshots showing the dimming effect?

Sure, here they are.

Right nano is in focus:

Left files is in focus:

1 Like