From df0c8e0f7a580e18eebbe934c00124a08b426583 Mon Sep 17 00:00:00 2001 From: Roberto Previdi Date: Mon, 9 Oct 2023 21:28:22 +0200 Subject: workspacerules: Add a persistent workspace rule (#3530) * add persistent flag to workspace rules * get rid of unused ws->indestructible flag --- src/config/ConfigManager.cpp | 2 ++ src/config/ConfigManager.hpp | 1 + 2 files changed, 3 insertions(+) (limited to 'src/config') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 23efe77e..f21ad9f3 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1177,6 +1177,8 @@ void CConfigManager::handleWorkspaceRules(const std::string& command, const std: wsRule.monitor = rule.substr(delim + 8); else if ((delim = rule.find("default:")) != std::string::npos) wsRule.isDefault = configStringToInt(rule.substr(delim + 8)); + else if ((delim = rule.find("persistent:")) != std::string::npos) + wsRule.isPersistent = configStringToInt(rule.substr(delim + 11)); }; size_t pos = 0; diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index 390079d3..e637979d 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -41,6 +41,7 @@ struct SWorkspaceRule { std::string workspaceName = ""; int workspaceId = -1; bool isDefault = false; + bool isPersistent = false; std::optional gapsIn; std::optional gapsOut; std::optional borderSize; -- cgit v1.2.3