Skip to content

feat(niri): close overview on window focus - #3030

Merged
bbedward merged 2 commits into
duxlabs-dev:masterfrom
korbash:feat/niri-overview-window-focus
Aug 17, 2026
Merged

bbedward merged 2 commits into
duxlabs-dev:masterfrom
korbash:feat/niri-overview-window-focus

Conversation

@korbash

@korbash korbash commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a single Niri-only Close Overview on Window Focus option under Personalization → Niri → Overview.

When enabled, DMS closes Niri's overview when an action launches or focuses a window from:

  • the Full and Spotlight launchers
  • the standalone Dock and the Apps Dock bar widget
  • Dock context-menu actions
  • Settings links in Control Center

This replaces the launcher-specific Close Overview on Launch option. Existing spotlightCloseNiriOverview values are migrated to the new shared setting, preserving the user's current preference.

The option is enabled by default. Disabling it keeps the overview open. Non-Niri sessions are unaffected and never attempt to toggle Niri's overview.

Possible follow-up

The remaining Enable Overview Overlay option still lives under Launcher → Niri Integration. It may make sense to move it to Personalization → Niri → Overview in a separate change, keeping all Niri overview behavior in one place.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Closes #2379

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: not applicable
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document the new behavior

@purian23

purian23 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Hi there, from the writeup it's a bit of a change. Can you provide a video walkthrough of the feature you're looking to implement. Thanks!

@korbash

korbash commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author
2026-08-10_02-09-23_03-25.mp4

@korbash

korbash commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

I definitely need more time to make this PR clearer.

@korbash
korbash force-pushed the feat/niri-overview-window-focus branch from c96f6fe to 8f34cc6 Compare August 10, 2026 16:04
@korbash

korbash commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

I rewrote the PR to centralize the behavior instead of adding Niri overview checks at individual UI call sites.

The overview close logic now lives in the lower-level paths:

  • SettingsModal.show() for opening/showing Settings, including tab/lazy-load paths.
  • CompositorService.activateToplevel() for focusing existing windows.
  • CompositorService.toggleToplevel() now routes focus branches through activateToplevel().
  • SessionService.launchDesktopEntry() / launchDesktopAction() for launching new apps/actions. Ideally this would wait until the launched window actually appears, but I did know how to do that.
  • focusOrToggleSettings*() keeps the existing hide/toggle behavior; only its focus branch uses activateToplevel().

The old launcher-only setting was replaced with closeNiriOverviewOnWindowFocus and moved to Personalization → Niri → Overview, with migration from spotlightCloseNiriOverview.

@korbash
korbash force-pushed the feat/niri-overview-window-focus branch from 8f34cc6 to 8926301 Compare August 13, 2026 17:59
"label": "Niri Integration",
"tabIndex": 9,
"category": "Launcher",
"section": "closeNiriOverviewOnWindowFocus",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-commit will reject this because its hand-edited, it is generated by the python scriptin the same folder

@bbedward
bbedward force-pushed the feat/niri-overview-window-focus branch from 8926301 to 0197238 Compare August 17, 2026 17:23
@bbedward
bbedward merged commit 0100c64 into duxlabs-dev:master Aug 17, 2026
1 check passed
by-architect pushed a commit to by-architect/Phoenix that referenced this pull request Aug 19, 2026
* feat(niri): close overview on window focus

* feat(niri): close overview on window focus

---------

Co-authored-by: bbedward <bbedward@gmail.com>
marcusramberg pushed a commit to marcusramberg/DankMaterialShell that referenced this pull request Sep 2, 2026
* feat(niri): close overview on window focus

* feat(niri): close overview on window focus

---------

Co-authored-by: bbedward <bbedward@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Close overview when starting application from dock

3 participants