feat: add module windowrule support
This commit is contained in:
@@ -38,6 +38,7 @@ M.autostart = {}
|
|||||||
M.autostop = {}
|
M.autostop = {}
|
||||||
M.binds = {}
|
M.binds = {}
|
||||||
M.envs = {}
|
M.envs = {}
|
||||||
|
M.windowrules = {}
|
||||||
|
|
||||||
local function collect_modules_prop(module, prop)
|
local function collect_modules_prop(module, prop)
|
||||||
if module[prop] then
|
if module[prop] then
|
||||||
@@ -51,6 +52,7 @@ for _, item in ipairs(modules) do
|
|||||||
collect_modules_prop(module, "autostop")
|
collect_modules_prop(module, "autostop")
|
||||||
collect_modules_prop(module, "binds")
|
collect_modules_prop(module, "binds")
|
||||||
collect_modules_prop(module, "envs")
|
collect_modules_prop(module, "envs")
|
||||||
|
collect_modules_prop(module, "windowrules")
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.load()
|
function M.load()
|
||||||
@@ -61,6 +63,10 @@ function M.load()
|
|||||||
for name, value in pairs(M.envs) do
|
for name, value in pairs(M.envs) do
|
||||||
hl.env(name, value)
|
hl.env(name, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for _, rule in ipairs(M.windowrules) do
|
||||||
|
hl.window_rule(rule)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -17,4 +17,14 @@ M.binds = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M.windowrules = {
|
||||||
|
{
|
||||||
|
name = "Pyprland rules",
|
||||||
|
match = {
|
||||||
|
class = "kitty-dropterm"
|
||||||
|
},
|
||||||
|
float = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user