diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-09 17:17:02 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-09 17:17:02 +0000 |
| commit | d5352a5d1290bee221ef05f555405f14ee9997f5 (patch) | |
| tree | 6876a9607cb084de1179947b26d8b735db2b8706 /src/config/ConfigManager.cpp | |
| parent | fd43d2bea7e8d6e0915c7c2838554cde5356f54f (diff) | |
find a default workspace smarter
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 12 |
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); } |
