Skip to content

Can't use windowrulev2 for automatically centering floating windows #4118

Description

@MariaSolOs

Hyprland Version

v0.33.1

Bug or Regression?

Bug

Description

I've been trying to configure Hyprland to automatically center floating windows. From the docs it seems like I should be able to achieve this with a window rule like windowrulev2 = center, floating:1, but that's not working.

I managed to achieve this by using the following binding to combine both dispatchers:

bind = SUPER, F, exec, hyprctl --batch "dispatch togglefloating ; dispatch centerwindow"

Although that works when using the binding, I wonder if there's a better way workaround...

How to reproduce

Add the following to your Hyprland configuration:

bind = SUPER, F, togglefloating
windowrulev2 = center, floating:1

Toggle the floating status of a window using the SUPER + F mapping above. Notice how the floating window isn't automatically centered.

Crash reports, logs, images, videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions