mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
Added dynamic monitor rules
This commit is contained in:
@@ -396,6 +396,13 @@ void CConfigManager::loadConfigLoadVars() {
|
||||
g_pHyprError->queueCreate("Warning: You're using an autogenerated config! (config file: " + CONFIGPATH + " )\nSUPER+Enter -> kitty\nSUPER+T -> Alacritty\nSUPER+M -> exit Hyprland", CColor(255, 255, 70, 255));
|
||||
else
|
||||
g_pHyprError->destroy();
|
||||
|
||||
// Set the modes for all monitors as we configured them
|
||||
// not on first launch because monitors might not exist yet
|
||||
// and they'll be taken care of in the newMonitor event
|
||||
if (!isFirstLaunch) {
|
||||
m_bWantsMonitorReload = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CConfigManager::tick() {
|
||||
@@ -526,4 +533,13 @@ void CConfigManager::dispatchExecOnce() {
|
||||
}
|
||||
|
||||
firstExecRequests.clear(); // free some kb of memory :P
|
||||
}
|
||||
|
||||
void CConfigManager::performMonitorReload() {
|
||||
for (auto& m : g_pCompositor->m_lMonitors) {
|
||||
auto rule = getMonitorRuleFor(m.szName);
|
||||
g_pHyprRenderer->applyMonitorRule(&m, &rule);
|
||||
}
|
||||
|
||||
m_bWantsMonitorReload = false;
|
||||
}
|
Reference in New Issue
Block a user