I came across a GNOME extension today that could help you keep focus on the app you’re working in – even when a smorgasbord of other apps are open, visible, and demanding attention from behind it!
All it does is dim background windows.
That’s it.
When enabled, the window in ‘focus’ (technical focus; the window you’re able to interact with using your keyboard or mouse without needing to click on it again) sits in full brightness – thus obvious and drawing in your attention.
Every other visible window sits in the dark.
When you switch focus to a different app the “light” goes with it and the app that was bright dims. This all happens automatically; there are no keyboard shortcuts to trigger, or lists of apps to compile.
This extension will only dim background windows (and will do so automatically). Your desktop wallpaper isn’t darkened, nor are other parts of the desktop UI.
You can control how dark unfocused windows are, and even whether they appear desaturated. There’s no way to omit a specific app from being affected when not in focus. There are no other options; no exception lists, no animations, no advanced effects.
The extension works by adding using “…a GLSL fragment shader to alter the brightness and saturation of background windows. It reacts on new window and focus events and doesn’t do anything outside of those events.”
And in case you’re wondering if the effect is as noticeable with “dark mode” enabled – it is (though I did adjust the default dim amount in this GIF):
I can’t make claims about the “science” of dimming unfocused windows (I’m not sure if there even is any research on the benefits, either). But from a layman’s POV it’s easy to see how this could help you focus on one thing at a time.
Try it out and see if it works for you, I guess!