Skip to content

feat: add stayfocused window rule#579

Open
prankstr wants to merge 1 commit intomangowm:mainfrom
prankstr:feat/stayfocused
Open

feat: add stayfocused window rule#579
prankstr wants to merge 1 commit intomangowm:mainfrom
prankstr:feat/stayfocused

Conversation

@prankstr
Copy link
Copy Markdown

Add stayfocused window rule that forces focus on a window as long as it's visible, similar to Hyprlands stayfocused windowrule. Fixes #558

Useful for password managers and other popups where you don't want to lose focus by moving the mouse.

It seemed least invasive to re-use exlusive_focus since it already does half the work, so this PR:

  • Adds stayfocused property to window rules
  • Sets exclusive_focus when a stayfocused window gains focus
  • Adds early return in focusclient() to prevent focus changes while a stayfocused window is visible
  • Clears exclusive_focus when the stayfocused window is unmapped

Usage:
windowrule=stayfocused:1,title:1Password

@DreamMaoMao DreamMaoMao force-pushed the main branch 4 times, most recently from 4a25da7 to f1cca25 Compare January 24, 2026 14:59
@DreamMaoMao DreamMaoMao force-pushed the main branch 3 times, most recently from cfd4249 to eb06075 Compare February 2, 2026 06:59
@DreamMaoMao DreamMaoMao force-pushed the main branch 3 times, most recently from 63097bd to 17acdae Compare February 12, 2026 10:12
@DreamMaoMao DreamMaoMao force-pushed the main branch 4 times, most recently from dc016eb to 6b2d694 Compare February 22, 2026 03:52
@DreamMaoMao DreamMaoMao force-pushed the main branch 3 times, most recently from 673ec40 to db30977 Compare March 9, 2026 05:28
@DreamMaoMao DreamMaoMao force-pushed the main branch 2 times, most recently from 0d3ed31 to 5267649 Compare March 30, 2026 10:35
waliori added a commit to waliori/noirwm that referenced this pull request Apr 24, 2026
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.

[Feature Request] Stayfocused window rule

1 participant