just gave up and used an envvar instead

This commit is contained in:
2026-08-25 19:57:18 +01:00
parent f6ba90efde
commit b2869e9af1
3 changed files with 17 additions and 7 deletions

View File

@@ -1,14 +1,30 @@
-- ~/.config/hypr/autoload.lua
-- Path to search
local hyprRoot
local modules
if os.getenv("HYPRLAND_ROOT") then
hyprRoot = os.getenv("HYPRLAND_ROOT")
else
hyprRoot = os.getenv("HOME") .. "/.config/hypr"
end
if os.getenv("MODULES_ROOT") then
modules = os.getenv("MODULES_ROOT")
else
modules = os.getenv("HOME") .. "/.config/hypr/modules"
end
local pluginsOk, pluginsErr = pcall(dofile, hyprRoot .. "plugins.lua")
if not pluginsOk then
hl.notification.create({
text = "autoload: " .. hyprRoot .. "plugins.lua" .. "\n" .. tostring(pluginsErr),
timeout = 8000,
icon = "warning",
})
end
-- Get all files in modules dir
local p = io.popen('find -L "' .. modules .. '" -name "*.lua" -type f | sort')
if not p then