Smart_Split is great, except at launch

I love the behaviour of Smart_Split, but when I log in and ~10 windows spawn quickly, the windows get very small because they all spawn with the cursor in the same place.

I was trying to disable smart split for a short while then enable it, but that isn’t possible.

Is there some other way to get the initial windows in a sane tiling and then have smart split for all my interactive stuff?

Disable it, then enable it in a hl.timer?

I’m not sure this is relatable here but I used to use hyprctl eval to delay it with sleep. It may not be trivial, but works most of the time

-- plguins without getting any errors
	hl.exec_cmd("hyprpm reload ; hyprctl eval \"$(cat ~/.config/hypr/plugin.lua)\"")
-- smart gaps after .2 seconds
hl.dsp.exec_cmd("sleep .2 ; hyprctl eval 'hl.config({ dwindle = {smart_split = false} })'")
hl.dsp.exec_cmd("sleep 15; hyprctl eval 'hl.config({ dwindle = { smart_split = true }})'")

Is not working for me, running the hyprctl eval in a terminal does it, but not work at login.

(and later exec_cmd lines are working, so it should be attempted)

Putting it into a timer did work:

local smartSplitDelay = hl.timer(function()
	hl.config({ dwindle = { smart_split = true }})
end, { timeout = 5000, type = "oneshot" })

smartSplitDelay:set_enabled(true)