initial
This commit is contained in:
26
autoload.lua
Normal file
26
autoload.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
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
|
||||
Reference in New Issue
Block a user