new: add envs to modules
This commit is contained in:
@@ -37,6 +37,7 @@ end
|
||||
M.autostart = {}
|
||||
M.autostop = {}
|
||||
M.binds = {}
|
||||
M.envs = {}
|
||||
|
||||
local function collect_modules_prop(module, prop)
|
||||
if module[prop] then
|
||||
@@ -49,6 +50,7 @@ for _, item in ipairs(modules) do
|
||||
collect_modules_prop(module, "autostart")
|
||||
collect_modules_prop(module, "autostop")
|
||||
collect_modules_prop(module, "binds")
|
||||
collect_modules_prop(module, "envs")
|
||||
end
|
||||
|
||||
function M.load()
|
||||
@@ -56,6 +58,9 @@ function M.load()
|
||||
events.map("hyprland.shutdown", M.autostop)
|
||||
|
||||
bind.map(M.binds)
|
||||
for name, value in pairs(M.envs) do
|
||||
hl.env(name, value)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user