mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 12:45:59 +01:00
core: add HYPRLAND_CONFIG environment variable (#7851)
This commit is contained in:
parent
e5ff19ac0f
commit
508bde1f61
1 changed files with 4 additions and 0 deletions
|
@ -683,6 +683,10 @@ std::string CConfigManager::getMainConfigPath() {
|
||||||
if (!g_pCompositor->explicitConfigPath.empty())
|
if (!g_pCompositor->explicitConfigPath.empty())
|
||||||
return g_pCompositor->explicitConfigPath;
|
return g_pCompositor->explicitConfigPath;
|
||||||
|
|
||||||
|
if (const auto CFG_ENV = getenv("HYPRLAND_CONFIG"); CFG_ENV)
|
||||||
|
return CFG_ENV;
|
||||||
|
Debug::log(TRACE, "Seems as if HYPRLAND_CONFIG isn't set, let's see what we can do with HOME.");
|
||||||
|
|
||||||
static const auto paths = Hyprutils::Path::findConfig(ISDEBUG ? "hyprlandd" : "hyprland");
|
static const auto paths = Hyprutils::Path::findConfig(ISDEBUG ? "hyprlandd" : "hyprland");
|
||||||
if (paths.first.has_value()) {
|
if (paths.first.has_value()) {
|
||||||
return paths.first.value();
|
return paths.first.value();
|
||||||
|
|
Loading…
Reference in a new issue