Floating Firefox Extension's Windows

Regular rules do not work with Firefox extensions because Firefox sets the title of the window after spawning it.

The workaround for this is using Hyprland’s events:

hl.on("window.title", function(w)
    if string.find(w.title, "Extension: (AliasVault)", nil, true ) then
        local monitor = hl.get_active_monitor()
        if monitor == nil then
            return
        end

        local win_size = {
            width = 500,
            height = 530
        }
        --[[ local win_pos = {
            x = monitor.width * 0.5 - win_size.width * 0.5,
            y = monitor.height * 0.5 - win_size.height * 0.5
        } --]]

        hl.dispatch(
            hl.dsp.window.float({
                action = "enable",
                window = w
            })
        )
        hl.dispatch(
            hl.dsp.window.resize({
                x = win_size.width,
                y = win_size.height,
                relative = false,
                window = w
            })
        )
        --[[ hl.dispatch(
            hl.dsp.window.move({
                x = win_pos.x,
                y = win_pos.y,
                relative = false,
                window = w
            })
        ) --]]
        hl.dispatch(hl.dsp.window.center({ window = w }))
    end
end)

You can use the commented section if you would like the window somewhere specific.

That is all, cheers.

After trying unsuccessfully various methods including timers to script a solution to:

I applied your function and it no workie for the noscript window.

This is just a curiosity as I don’t use Firefox for other than testing.