Add user specific config path.

This commit is contained in:
SolitudeSF 2019-10-11 18:01:56 +03:00
parent cad6037c6c
commit 5bdd0c8135
No known key found for this signature in database
GPG Key ID: 789B06817C385387

View File

@ -51,10 +51,13 @@ const
proc main() =
var config = defaultConfig
var configFile = ""
let configFile = block:
if paramCount() > 0:
paramStr(1)
else:
getConfigDir() / "boomer" / "config"
if paramCount() > 0:
configFile = paramStr(1)
if existsFile configFile:
config = loadConfig(configFile)
echo "Using config: ", config