From 5b008b1022c8d3bac04da319a864f67202370d40 Mon Sep 17 00:00:00 2001 From: voidarc Date: Thu, 27 Aug 2026 14:22:44 +0100 Subject: [PATCH] made import module and added runtime.lua --- autoload.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/autoload.lua b/autoload.lua index 93eba77..e619630 100644 --- a/autoload.lua +++ b/autoload.lua @@ -16,15 +16,20 @@ 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", - }) +local function importRelativeModule(module) + local ok, err = pcall(dofile, hyprRoot .. "/" .. module) + if not ok then + hl.notification.create({ + text = "autoload: " .. hyprRoot .. module .. "\n" .. tostring(err), + timeout = 8000, + icon = "warning", + }) + end end +importRelativeModule("plugins.lua") +importRelativeModule("runtime.lua") + -- Get all files in modules dir local p = io.popen('find -L "' .. modules .. '" -name "*.lua" -type f | sort') if not p then