From 1698c23ee8311001ee0efc7bf1105a86b37ea68c Mon Sep 17 00:00:00 2001 From: flux <25628292+fluxionary@users.noreply.github.com> Date: Thu, 1 Sep 2022 17:01:00 -0700 Subject: [PATCH] make use of i3's "compression" feature --- stairsplus/compat/i3.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stairsplus/compat/i3.lua b/stairsplus/compat/i3.lua index 0a107b7..75f475e 100644 --- a/stairsplus/compat/i3.lua +++ b/stairsplus/compat/i3.lua @@ -1,4 +1,4 @@ --- luacheck: read globals i3 +-- luacheck: globals i3 if not stairsplus.has.i3 then return @@ -91,6 +91,14 @@ local function on_register_single(node, shaped_name) result = shaped_name, items = {node}, }) + + local micronode = api.get_micronode(node) + if shaped_name ~= micronode then + local compress_groups = i3.compress_groups[micronode] or {} + table.insert(compress_groups, shaped_name) + i3.compress_groups[micronode] = compress_groups + i3.compressed[shaped_name] = true + end end for _, single in ipairs(api.registered_singles) do