Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dim-inactive-windows@jark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ stands out at a glance while inactive content stays fully readable.
- Smooth fade on focus change (configurable duration, or instant).
- Leaves menus, tooltips, notifications, panels and the desktop untouched.
- Optional: keep a window bright while one of its *modal* dialogs is focused.
- Optional: never dim windows in *real* fullscreen — a video keeps playing at
full brightness on one monitor while you work on another.
- No compositor patching, no overlays — uses Clutter effects on the window actors.

## Requirements
Expand Down Expand Up @@ -63,6 +65,7 @@ Open **System Settings → Extensions → Dim Inactive Windows → ⚙ (Configur
| Fade duration | 150 ms | 0 = instant switch |
| Keep parent bright for modal dialogs | off | Strict per-window when off (recommended) |
| Dim when nothing is focused | off | Also dim everything after clicking the desktop |
| Never dim fullscreen windows | on | A video in *real* fullscreen stays bright while you work on another monitor. Maximized windows are unaffected |

## How it works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ DimInactiveWindows.prototype = {
this.animationTime = 150; // ms
this.respectTransient = false;
this.dimWhenNoFocus = false;
this.skipFullscreen = true;

this.settings = new Settings.ExtensionSettings(this, this.uuid);
let reapply = () => this._updateAll(true); // instant re-apply on change
Expand All @@ -46,13 +47,17 @@ DimInactiveWindows.prototype = {
this.settings.bind("animation-time", "animationTime", reapply);
this.settings.bind("respect-transient", "respectTransient", reapply);
this.settings.bind("dim-when-no-focus", "dimWhenNoFocus", reapply);
this.settings.bind("skip-fullscreen", "skipFullscreen", reapply);
},

enable: function() {
this._connect(global.display, "notify::focus-window");
this._connect(global.window_manager, "map");
this._connect(global.window_manager, "destroy");
this._connect(global.window_manager, "switch-workspace");
// A window on another monitor can go fullscreen while the focus stays
// where it is, so the focus signal alone would not catch it.
this._connect(global.display, "in-fullscreen-changed");
this._updateAll(true); // snap to correct state, no initial fade
},

Expand Down Expand Up @@ -103,6 +108,11 @@ DimInactiveWindows.prototype = {
// its parent while a MODAL dialog child holds focus. Deliberately no app /
// PID grouping, so sibling windows of one app stay independent.
_isActive: function(mw, focus) {
// Real fullscreen (not merely maximised) is always left alone when the
// option is on: on a multi-monitor setup a video keeps playing at full
// brightness on one screen while you work on another.
if (this.skipFullscreen && mw.is_fullscreen())
return true;
if (!focus)
return !this.dimWhenNoFocus;
if (mw === focus)
Expand Down
10 changes: 10 additions & 0 deletions dim-inactive-windows@jark/files/dim-inactive-windows@jark/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ msgid ""
msgstr ""
"Auch alle Fenster abdunkeln, wenn nichts fokussiert ist (z. B. nach Klick auf "
"den Desktop)"

#. settings-schema.json->skip-fullscreen->description
msgid ""
"Never dim windows in real fullscreen mode (videos, presentations). Maximized "
"windows are not affected by this. Only makes a difference on multi-monitor "
"setups"
msgstr ""
"Fenster im echten Vollbildmodus nie abdunkeln (Videos, Präsentationen). "
"Maximierte Fenster sind davon nicht betroffen. Wirkt sich nur bei mehreren "
"Monitoren aus"
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,10 @@ msgid ""
"Also dim every window when nothing is focused (e.g. after clicking the "
"desktop)"
msgstr ""

#. settings-schema.json->skip-fullscreen->description
msgid ""
"Never dim windows in real fullscreen mode (videos, presentations). Maximized "
"windows are not affected by this. Only makes a difference on multi-monitor "
"setups"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@
"type": "checkbox",
"default": false,
"description": "Also dim every window when nothing is focused (e.g. after clicking the desktop)"
},
"skip-fullscreen": {
"type": "checkbox",
"default": true,
"description": "Never dim windows in real fullscreen mode (videos, presentations). Maximized windows are not affected by this. Only makes a difference on multi-monitor setups"
}
}
Loading