find a default workspace smarter

This commit is contained in:
vaxerski
2022-12-09 17:17:02 +00:00
parent fd43d2bea7
commit d5352a5d12
4 changed files with 29 additions and 1 deletions

View File

@@ -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);
}