diff options
author | Vaxry <[email protected]> | 2024-02-27 22:44:42 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-02-27 22:44:42 +0000 |
commit | f26d7aa58d78e764871ff026fb78f4322f0a6879 (patch) | |
tree | c6702cffa2fd06d41200dbc0bfc0eda57742cf90 /src/config | |
parent | e2c286548d2a83376df3001bab0b48e529bd0075 (diff) | |
download | Hyprland-f26d7aa58d78e764871ff026fb78f4322f0a6879.tar.gz Hyprland-f26d7aa58d78e764871ff026fb78f4322f0a6879.zip |
config: add defaultName for workspace rules
alas, fixes #665
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/ConfigManager.cpp | 2 | ||||
-rw-r--r-- | src/config/ConfigManager.hpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 8b14e75a..8095b64c 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2160,6 +2160,8 @@ std::optional<std::string> CConfigManager::handleWorkspaceRules(const std::strin wsRule.isDefault = configStringToInt(rule.substr(delim + 8)); else if ((delim = rule.find("persistent:")) != std::string::npos) wsRule.isPersistent = configStringToInt(rule.substr(delim + 11)); + else if ((delim = rule.find("defaultName:")) != std::string::npos) + wsRule.defaultName = rule.substr(delim + 12); else if ((delim = rule.find(ruleOnCreatedEmtpy)) != std::string::npos) wsRule.onCreatedEmptyRunCmd = cleanCmdForWorkspace(name, rule.substr(delim + ruleOnCreatedEmtpyLen)); else if ((delim = rule.find("layoutopt:")) != std::string::npos) { diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index 48131bdd..fbc61059 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -43,6 +43,7 @@ struct SWorkspaceRule { std::optional<int> decorate; std::optional<int> shadow; std::optional<std::string> onCreatedEmptyRunCmd; + std::optional<std::string> defaultName; std::map<std::string, std::string> layoutopts; }; |