Floating window rule for default size not working with new 0.53.1 syntax

Hyprland version 0.53.1. This window rule used to be able to set the default size of Brave windows when I toggle them to floating

windowrulev2 = size 500 500, class:(brave-browser)

I used this new window rule conversion tool to get the new syntax which ends up being

windowrule {
  name = windowrule-98
  size = 500 500
  match:class = (brave-browser)
}

But it no longer works and when I pop a tiled Brave browser window into floating mode the default size is not the intended 500x500 and is instead some other much larger default.

I am using other floating window rules. Could there be a conflict here? Here’s the other rule I’m using which does work (to round window edges)

windowrule {
  name = windowrule-99
  rounding = 10
  match:float = 1
}

No way of doing that atm sadly.
size is a static rule and applied when the window is created.
And if it’s not floating at the time of creation, no size will be set.

if you want to know more.

Here’s a workaround. Add bind = $mod, R, resizeactive exact 640 480 as a binding. Or even better add this to your bindings.conf as an all in one solution:

bind = SUPER, R, exec, sh -c '/usr/local/bin/togglefloating-script.sh; hyprctl dispatch resizeactive exact 640 480'

where togglefloating-script.sh contains the contents:

#!/bin/bash
hyprctl dispatch togglefloating   

and don’t forget to chmod +x /usr/local/bin/togglefloating-script.sh.
Another nice tip is add the following to bindings.conf to dynamically resize a floating window:

# Switch to a submap called `resize`.
bind = ALT, R, submap, resize

# Start a submap called "resize".
submap = resize

# Set repeatable binds for resizing the active window.
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10

# Use `reset` to go back to the global submap
bind = , escape, submap, reset

# Reset the submap, which will return to the global submap
submap = reset

taken from https://wiki.hypr.land/Configuring/Binds/.