Skip to content

Add active-window-* as options for floating window relative-to rule#3465

Open
contagnas wants to merge 1 commit intoniri-wm:mainfrom
contagnas:active-window-relative
Open

Add active-window-* as options for floating window relative-to rule#3465
contagnas wants to merge 1 commit intoniri-wm:mainfrom
contagnas:active-window-relative

Conversation

@contagnas
Copy link

This adds "active-window-*" options to the RelativeTo enum for default-floating-position. These position the new floating window relative to the currently active window. My use case to emulating window parenting for applications` that don't support it, but I could imagine other uses as well.

Demo:

2026-02-16_11-55-53.mp4

If there is no active window the new window goes to the center of the screen.

Considered some alternative approaches, because IMO this enum is a little bloated after this change:

  • new option in window-rule like default-floating-position-relative-to-active-window that would accept the same relative-to options
  • hook to an external program that would decide coordinates

but just adding these to the enum seems more straightforward and understandable.

@contagnas
Copy link
Author

somewhat related: #978

@Sempyos Sempyos added area:layout Columns, workspaces, scrolling, fullscreen, resize area:config Config parsing, default config, new settings pr kind:feature New features and functionality labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:config Config parsing, default config, new settings area:layout Columns, workspaces, scrolling, fullscreen, resize pr kind:feature New features and functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants