summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-12-09 17:17:02 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-12-09 17:17:02 +0000
commitd5352a5d1290bee221ef05f555405f14ee9997f5 (patch)
tree6876a9607cb084de1179947b26d8b735db2b8706 /src/config/ConfigManager.cpp
parentfd43d2bea7e8d6e0915c7c2838554cde5356f54f (diff)
find a default workspace smarter
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index e668a98a..89152acc 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -1688,6 +1688,18 @@ CMonitor* CConfigManager::getBoundMonitorForWS(std::string wsname) {
return nullptr;
}
+std::string CConfigManager::getBoundMonitorStringForWS(std::string wsname) {
+ for (auto& [ws, mon] : boundWorkspaces) {
+ const auto WSNAME = ws.find("name:") == 0 ? ws.substr(5) : ws;
+
+ if (WSNAME == wsname) {
+ return mon;
+ }
+ }
+
+ return "";
+}
+
void CConfigManager::addExecRule(SExecRequestedRule rule) {
execRequestedRules.push_back(rule);
}