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

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

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