aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSaltaformajo <[email protected]>2023-02-06 00:53:13 +0200
committerGitHub <[email protected]>2023-02-05 22:53:13 +0000
commit4a5c3c4861fb503c7ecb6dcfc86aeb547aa3fb7f (patch)
treef4a533ef5156422a84948ec31052157cab3d8e1e
parent15544c7544ac80f90fa341081967b95b70a8e046 (diff)
downloadHyprland-4a5c3c4861fb503c7ecb6dcfc86aeb547aa3fb7f.tar.gz
Hyprland-4a5c3c4861fb503c7ecb6dcfc86aeb547aa3fb7f.zip
explicit config path for autoreload config #1423 (#1494)
* respect explicit config path for autoreload config
-rw-r--r--src/config/ConfigManager.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 8bc12fda..614670e1 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -1333,10 +1333,14 @@ void CConfigManager::loadConfigLoadVars() {
}
void CConfigManager::tick() {
- static const char* const ENVHOME = getenv("HOME");
-
- const std::string CONFIGPATH = ENVHOME + (ISDEBUG ? (std::string) "/.config/hypr/hyprlandd.conf" : (std::string) "/.config/hypr/hyprland.conf");
-
+ std::string CONFIGPATH;
+ if (g_pCompositor->explicitConfigPath.empty()) {
+ static const char* const ENVHOME = getenv("HOME");
+ CONFIGPATH = ENVHOME + (ISDEBUG ? (std::string) "/.config/hypr/hyprlandd.conf" : (std::string) "/.config/hypr/hyprland.conf");
+ } else {
+ CONFIGPATH = g_pCompositor->explicitConfigPath;
+ }
+
if (!std::filesystem::exists(CONFIGPATH)) {
Debug::log(ERR, "Config doesn't exist??");
return;