diff options
| author | staz <alyystaz@gmail.com> | 2024-04-06 19:53:32 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-06 15:53:32 +0100 |
| commit | 1596e2d1f7db76c4a367a6beb814d79db019d8d2 (patch) | |
| tree | f16ca929542de890e66501417a88741393df4e3f /src/config/ConfigManager.cpp | |
| parent | 6cea710ac8e966366763b9609895dcef7fdb5bcb (diff) | |
workspacerules: add back on-created-empty functionality (#5452)
* workspacerules: add back on-created-empty functionality
* clang format
* workspacerules: spawn on-created-empty window while initializing CWorkspace
* clang format
* configManager: fix typo
---------
Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index a622e6d0..f3fd9b7f 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2237,8 +2237,8 @@ std::optional<std::string> CConfigManager::handleWorkspaceRules(const std::strin // rules = value.substr(WORKSPACE_DELIM + 1); // } - const static std::string ruleOnCreatedEmtpy = "on-created-empty:"; - const static int ruleOnCreatedEmtpyLen = ruleOnCreatedEmtpy.length(); + const static std::string ruleOnCreatedEmpty = "on-created-empty:"; + const static int ruleOnCreatedEmptyLen = ruleOnCreatedEmpty.length(); auto assignRule = [&](std::string rule) -> std::optional<std::string> { size_t delim = std::string::npos; @@ -2274,8 +2274,8 @@ std::optional<std::string> CConfigManager::handleWorkspaceRules(const std::strin 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(ruleOnCreatedEmpty)) != std::string::npos) + wsRule.onCreatedEmptyRunCmd = cleanCmdForWorkspace(name, rule.substr(delim + ruleOnCreatedEmptyLen)); else if ((delim = rule.find("layoutopt:")) != std::string::npos) { std::string opt = rule.substr(delim + 10); if (!opt.contains(":")) { |
