mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 03:09:48 +01:00
overwrite wsbind rules on existing
This commit is contained in:
parent
65fb0cf0f6
commit
73dbacd16d
1 changed files with 7 additions and 0 deletions
|
@ -939,6 +939,13 @@ void CConfigManager::handleBindWS(const std::string& command, const std::string&
|
|||
const auto WS = value.substr(0, value.find_first_of(','));
|
||||
const auto MON = value.substr(value.find_first_of(',') + 1);
|
||||
|
||||
const auto FOUND = std::find_if(boundWorkspaces.begin(), boundWorkspaces.end(), [&](const auto& other) { return other.first == WS; });
|
||||
|
||||
if (FOUND != boundWorkspaces.end()) {
|
||||
FOUND->second = MON;
|
||||
return;
|
||||
}
|
||||
|
||||
boundWorkspaces.push_back({WS, MON});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue