config: add key_press_enables_dpms

This commit is contained in:
vaxerski
2023-03-12 13:46:38 +00:00
parent 71ef1bde7e
commit 146d231ec5
2 changed files with 7 additions and 0 deletions

View File

@@ -963,6 +963,12 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar
if (!pKeyboard->enabled)
return;
static auto* const PDPMS = &g_pConfigManager->getConfigValuePtr("key_press_enables_dpms")->intValue;
if (*PDPMS && g_pCompositor->m_bDPMSStateON) {
// enable dpms
g_pKeybindManager->dpms("on");
}
bool passEvent = g_pKeybindManager->onKeyEvent(e, pKeyboard);
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);