Hi everyone.
Up to 0.54, I used the config below to sequentially start applications when Hyprland starts.
Example for starting VSCodium on workspace 9 then having the ability to start it anywhere else :
windowrule {
name = start-VSCodium
match:class = codium
workspace = 9 silent
}
exec-once = sleep 30 && vscodium
exec = sleep 60 && hyprctl keyword 'windowrule[start-vscodium]:enable false'
With 0.55 and Lua, I realized that I could simplify this logic with the ability of “Executing with rules“. So I tried the following :
hl.on(
"hyprland.start",
function ()
hl.exec_cmd(
"sleep 30 && vscodium",
{ workspace = "9 silent" }
)
end
)
It worked like a charm for all my app that I start at launch except for VSCodium (maybe a process fork as mentioned in the Wiki). So I had to reuse the static rule I had before :
hl.on(
"hyprland.start",
function ()
local VSCodiumRule = hl.window_rule({
name = "start-VSCodium",
match = { class = "codium" },
workspace = "9 silent"
})
hl.exec_cmd("sleep 30 && vscodium")
hl.exec_cmd("sleep 60 && ???????") -- What has to be here ?
end
)
VSCodium now starts perfectly and silently on workspace 9 but I can’t figure out how I can disable this rule after 60 seconds. I tried various combinations of hyprctl dispatch ..., hyprctl eval ..., all with VSCodiumRule:set_enabled(false) but I didn’t find any solution for disabling it.
Thanks in advance if you can help me achieving this.