diff options
author | Artur Manuel <[email protected]> | 2024-09-23 16:40:19 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-23 16:40:19 +0100 |
commit | 508bde1f61b1264c9621b937657088f09f318ce0 (patch) | |
tree | e0296517cd42dc6d367456991a6c9cf217b28c8b | |
parent | e5ff19ac0f2c8d53a0c847d06a17676e636d6447 (diff) | |
download | Hyprland-508bde1f61b1264c9621b937657088f09f318ce0.tar.gz Hyprland-508bde1f61b1264c9621b937657088f09f318ce0.zip |
core: add HYPRLAND_CONFIG environment variable (#7851)
-rw-r--r-- | src/config/ConfigManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 27e8fdb0..21a3a21e 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -683,6 +683,10 @@ std::string CConfigManager::getMainConfigPath() { if (!g_pCompositor->explicitConfigPath.empty()) 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"); if (paths.first.has_value()) { return paths.first.value(); |