added DPMS

This commit is contained in:
vaxerski
2022-07-27 12:32:00 +02:00
parent 50b991674b
commit 31a079b347
24 changed files with 287 additions and 211 deletions

View File

@@ -958,6 +958,9 @@ void CConfigManager::loadConfigLoadVars() {
// and they'll be taken care of in the newMonitor event
if (!isFirstLaunch) {
m_bWantsMonitorReload = true;
// check
ensureDPMS();
}
// Update window border colors
@@ -1212,3 +1215,14 @@ bool CConfigManager::shouldBlurLS(const std::string& ns) {
return false;
}
void CConfigManager::ensureDPMS() {
for (auto& rm : g_pCompositor->m_vRealMonitors) {
auto rule = getMonitorRuleFor(rm->szName);
if (rule.disabled == rm->m_bEnabled) {
rm->m_pThisWrap = &rm;
g_pHyprRenderer->applyMonitorRule(rm.get(), &rule);
}
}
}