diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-05 13:15:12 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-05 13:15:12 +0000 |
| commit | 90c5715bc6a3c9551ae13c9ac4e3578823e27e0b (patch) | |
| tree | 5c2bbcfcff44fe69b1efd54bb53dea6253f2eea2 /src/config/ConfigManager.cpp | |
| parent | d5093f7af0f2d1e6d39a3facd0806c36e9667af1 (diff) | |
add env dbus opt
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 78543609..5037d9cb 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1051,6 +1051,15 @@ void CConfigManager::handleEnv(const std::string& command, const std::string& va } setenv(ARGS[0].c_str(), ARGS[1].c_str(), 1); + + if (command.back() == 'd') { + // dbus + const auto CMD = "systemctl --user import-environment " + ARGS[0] + + " && hash dbus-update-activation-environment 2>/dev/null && " + "dbus-update-activation-environment --systemd " + + ARGS[0]; + handleRawExec("", CMD.c_str()); + } } std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std::string& VALUE, bool dynamic) { @@ -1097,7 +1106,7 @@ std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std:: handleBlurLS(COMMAND, VALUE); else if (COMMAND == "wsbind") handleBindWS(COMMAND, VALUE); - else if (COMMAND == "env") + else if (COMMAND.find("env") == 0) handleEnv(COMMAND, VALUE); else { configSetValueSafe(currentCategory + (currentCategory == "" ? "" : ":") + COMMAND, VALUE); |
