From d5352a5d1290bee221ef05f555405f14ee9997f5 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 9 Dec 2022 17:17:02 +0000 Subject: find a default workspace smarter --- src/config/ConfigManager.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/config/ConfigManager.cpp') 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); } -- cgit v1.2.3