mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
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/
This commit is contained in:
parent
fd997e8219
commit
f60a2c5c37
3 changed files with 34 additions and 46 deletions
|
|
@ -1,13 +1,3 @@
|
|||
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
|
||||
|
||||
-- allow loading files in the runtime directory
|
||||
package.path = package.path..";"..mez.fs.joinpath(mez.path.runtime, "?.lua")
|
||||
mez.inspect = require("inspect").inspect
|
||||
|
|
@ -15,6 +5,18 @@ mez.inspect = require("inspect").inspect
|
|||
mez.path.base_config = mez.fs.joinpath(mez.path.runtime, "master.lua")
|
||||
|
||||
if not mez.path.config then
|
||||
mez.path.config = mez.fs.joinpath(env_conf, "mez", "init.lua")
|
||||
package.path = package.path..";"..mez.fs.joinpath(env_conf, "mez", "lua", "?.lua")
|
||||
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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue