mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2026-04-04 17:48:18 +00:00
check XDG_CONFIG_HOME for config file
This commit is contained in:
parent
f261cf40ba
commit
a431803fc9
1 changed files with 3 additions and 0 deletions
|
|
@ -240,6 +240,9 @@ std::string Utils::getConfigFile() {
|
|||
const char* configFile = std::getenv("LSFG_CONFIG");
|
||||
if (configFile && *configFile != '\0')
|
||||
return{configFile};
|
||||
const char* xdgPath = std::getenv("XDG_CONFIG_HOME");
|
||||
if (xdgPath && *xdgPath != '\0')
|
||||
return std::string(xdgPath) + "/lsfg-vk/conf.toml";
|
||||
const char* homePath = std::getenv("HOME");
|
||||
if (homePath && *homePath != '\0')
|
||||
return std::string(homePath) + "/.config/lsfg-vk/conf.toml";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue