aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/config
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-02-27 22:44:42 +0000
committerVaxry <[email protected]>2024-02-27 22:44:42 +0000
commitf26d7aa58d78e764871ff026fb78f4322f0a6879 (patch)
treec6702cffa2fd06d41200dbc0bfc0eda57742cf90 /src/config
parente2c286548d2a83376df3001bab0b48e529bd0075 (diff)
downloadHyprland-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.cpp2
-rw-r--r--src/config/ConfigManager.hpp1
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;
};