mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-19 05:53:48 -07:00
workspacerules: overwrite on existing
This commit is contained in:
@@ -1125,7 +1125,12 @@ void CConfigManager::handleWorkspaceRules(const std::string& command, const std:
|
|||||||
wsRule.workspaceId = id;
|
wsRule.workspaceId = id;
|
||||||
wsRule.workspaceName = name;
|
wsRule.workspaceName = name;
|
||||||
|
|
||||||
m_dWorkspaceRules.emplace_back(wsRule);
|
const auto IT = std::find_if(m_dWorkspaceRules.begin(), m_dWorkspaceRules.end(), [&](const auto& other) { return other.workspaceString == wsRule.workspaceString; });
|
||||||
|
|
||||||
|
if (IT == m_dWorkspaceRules.end())
|
||||||
|
m_dWorkspaceRules.emplace_back(wsRule);
|
||||||
|
else
|
||||||
|
*IT = wsRule;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigManager::handleSubmap(const std::string& command, const std::string& submap) {
|
void CConfigManager::handleSubmap(const std::string& command, const std::string& submap) {
|
||||||
|
Reference in New Issue
Block a user