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