+-- kak: filetype=lua:tabstop=4:indentwidth=4
+-- ░█░█░█░█░█▀█░█▀▄░█░░░█▀█░█▀█░█▀▄░░░█▀▀░█▀█░█▀█░█▀▀░▀█▀░█▀▀
+-- ░█▀█░░█░░█▀▀░█▀▄░█░░░█▀█░█░█░█░█░░░█░░░█░█░█░█░█▀▀░░█░░█░█
+-- ░▀░▀░░▀░░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀░░░░▀▀▀░▀▀▀░▀░▀░▀░░░▀▀▀░▀▀▀
+
+
+-- equalize the split to nearest neighbours
+local function equalize()
+ hl.dispatch(hl.dsp.layout("splitratio 1.0 exact"))
+end
+
+hl.bind("SUPER + SHIFT + E", equalize)
+
+-- split ratio selector for ultrawide displays
+local rootRatio = {}
+
+local function toggleRootRatio()
+ local ws = hl.get_active_special_workspace()
+ or hl.get_active_workspace()
+
+ if not ws or ws.tiled_layout ~= "dwindle" then
+ return
+ end
+
+ local id = ws.id
+ local ratio = rootRatio[id] == 1.334 and 1.0 or 1.334
+
+ hl.dispatch(hl.dsp.layout(
+ string.format("splitratio %.3f exact root", ratio)
+ ))
+
+ rootRatio[id] = ratio
+end
+
+hl.bind("SUPER + SHIFT + R", toggleRootRatio)
+