make use of i3's "compression" feature

This commit is contained in:
flux 2022-09-01 17:01:00 -07:00
parent e70423fa6d
commit 1698c23ee8
No known key found for this signature in database
GPG Key ID: 9333B27816848A15
1 changed files with 9 additions and 1 deletions

View File

@ -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