mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 04:29:48 +01:00
monitor desc improvements
This commit is contained in:
parent
0e4a894edb
commit
9c5023ab1a
1 changed files with 2 additions and 2 deletions
|
@ -1300,7 +1300,7 @@ SMonitorRule CConfigManager::getMonitorRuleFor(std::string name, std::string dis
|
||||||
SMonitorRule* found = nullptr;
|
SMonitorRule* found = nullptr;
|
||||||
|
|
||||||
for (auto& r : m_dMonitorRules) {
|
for (auto& r : m_dMonitorRules) {
|
||||||
if (r.name == name) {
|
if (r.name == name || (r.name.find("desc:") == 0 && (r.name.substr(5) == displayName || r.name.substr(5) == removeBeginEndSpacesTabs(displayName.substr(0, displayName.find_first_of('(')))))) {
|
||||||
found = &r;
|
found = &r;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1312,7 +1312,7 @@ SMonitorRule CConfigManager::getMonitorRuleFor(std::string name, std::string dis
|
||||||
Debug::log(WARN, "No rule found for %s, trying to use the first.", name.c_str());
|
Debug::log(WARN, "No rule found for %s, trying to use the first.", name.c_str());
|
||||||
|
|
||||||
for (auto& r : m_dMonitorRules) {
|
for (auto& r : m_dMonitorRules) {
|
||||||
if (r.name == "" || (r.name.find("desc:") == 0 && r.name.substr(5) == displayName)) {
|
if (r.name == "") {
|
||||||
found = &r;
|
found = &r;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue