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)
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.
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:
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