Mezzaluna/runtime/share/mezzaluna/init.lua
Squibid f60a2c5c37 turns out passing in the -u flag didn't actually work before...
Additionally, in the case that the directory doesn't exist mezzaluna
will default back to the config at ~/.config/mez/
2026-03-05 09:33:02 -05:00

22 lines
743 B
Lua

-- allow loading files in the runtime directory
package.path = package.path..";"..mez.fs.joinpath(mez.path.runtime, "?.lua")
mez.inspect = require("inspect").inspect
mez.path.base_config = mez.fs.joinpath(mez.path.runtime, "master.lua")
if not mez.path.config then
local env_conf = os.getenv("XDG_CONFIG_HOME")
if not env_conf then
env_conf = os.getenv("HOME")
if not env_conf then
error("Couldn't determine potential config directory is $HOME set?")
end
env_conf = mez.fs.joinpath(env_conf, ".config")
end
mez.path.config = mez.fs.joinpath(env_conf, "mez")
end
package.path = package.path..";"..mez.fs.joinpath(mez.path.config, "lua", "?.lua")
mez.path.config = mez.fs.joinpath(mez.path.config, "init.lua")