mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 19:26:00 +01:00
add env dbus opt
This commit is contained in:
parent
d5093f7af0
commit
90c5715bc6
1 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue