27 lines
523 B
Lua
27 lines
523 B
Lua
local hyprRoot
|
|
local modules
|
|
|
|
if os.getenv("HYPRLAND_ROOT") then
|
|
hyprRoot = os.getenv("HYPRLAND_ROOT")
|
|
else
|
|
hyprRoot = os.getenv("Home") .. "/.config/hypr"
|
|
end
|
|
|
|
modules = hyprRoot .. "/modules"
|
|
|
|
local p = io.popen('find -L "' .. modules .. '" -name "*.lua" -type f | sort')
|
|
if not p then
|
|
return
|
|
end
|
|
|
|
for path in p:lines() do
|
|
local ok, error = pcall(dofile, path)
|
|
if not ok then
|
|
hl.notification.create({
|
|
text = "autoload: " .. path .. "\n" .. tostring(error),
|
|
timeout = 8000,
|
|
icon = "warning",
|
|
})
|
|
end
|
|
end
|