made import module and added runtime.lua

This commit is contained in:
2026-08-27 14:22:44 +01:00
parent 309c07ef94
commit 5b008b1022

View File

@@ -16,15 +16,20 @@ else
modules = os.getenv("HOME") .. "/.config/hypr/modules" modules = os.getenv("HOME") .. "/.config/hypr/modules"
end end
local pluginsOk, pluginsErr = pcall(dofile, hyprRoot .. "/plugins.lua") local function importRelativeModule(module)
if not pluginsOk then local ok, err = pcall(dofile, hyprRoot .. "/" .. module)
if not ok then
hl.notification.create({ hl.notification.create({
text = "autoload: " .. hyprRoot .. "plugins.lua" .. "\n" .. tostring(pluginsErr), text = "autoload: " .. hyprRoot .. module .. "\n" .. tostring(err),
timeout = 8000, timeout = 8000,
icon = "warning", icon = "warning",
}) })
end
end end
importRelativeModule("plugins.lua")
importRelativeModule("runtime.lua")
-- Get all files in modules dir -- Get all files in modules dir
local p = io.popen('find -L "' .. modules .. '" -name "*.lua" -type f | sort') local p = io.popen('find -L "' .. modules .. '" -name "*.lua" -type f | sort')
if not p then if not p then