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