mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 05:25:58 +01:00
monitor desc default workspace (#2673)
This commit is contained in:
parent
d9f7f039e1
commit
4cc0e6de90
1 changed files with 6 additions and 4 deletions
|
@ -2183,8 +2183,10 @@ void CConfigManager::removePluginConfig(HANDLE handle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CConfigManager::getDefaultWorkspaceFor(const std::string& name) {
|
std::string CConfigManager::getDefaultWorkspaceFor(const std::string& name) {
|
||||||
const auto IT = std::find_if(m_dWorkspaceRules.begin(), m_dWorkspaceRules.end(), [&](const auto& other) { return other.monitor == name && other.isDefault; });
|
for (auto other = m_dWorkspaceRules.begin(); other != m_dWorkspaceRules.end(); ++other) {
|
||||||
if (IT == m_dWorkspaceRules.end())
|
if (other->isDefault &&
|
||||||
|
(other->monitor == name || (other->monitor.substr(0, 5) == "desc:" && g_pCompositor->getMonitorFromDesc(other->monitor.substr(5))->szName == name)))
|
||||||
|
return other->workspaceString;
|
||||||
|
}
|
||||||
return "";
|
return "";
|
||||||
return IT->workspaceString;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue