mirror of
https://github.com/hyprwm/hypridle.git
synced 2025-12-20 17:10:02 +01:00
core: check if on_(un)lock_cmd is empty
This commit is contained in:
parent
be173c50be
commit
fd785ec299
1 changed files with 2 additions and 2 deletions
|
|
@ -313,7 +313,7 @@ void CHypridle::onLocked() {
|
||||||
m_isLocked = true;
|
m_isLocked = true;
|
||||||
|
|
||||||
static const auto LOCKCMD = g_pConfigManager->getValue<Hyprlang::STRING>("general:on_lock_cmd");
|
static const auto LOCKCMD = g_pConfigManager->getValue<Hyprlang::STRING>("general:on_lock_cmd");
|
||||||
if (*LOCKCMD)
|
if (!std::string{*LOCKCMD}.empty())
|
||||||
spawn(*LOCKCMD);
|
spawn(*LOCKCMD);
|
||||||
|
|
||||||
if (m_inhibitSleepBehavior == SLEEP_INHIBIT_LOCK_NOTIFY)
|
if (m_inhibitSleepBehavior == SLEEP_INHIBIT_LOCK_NOTIFY)
|
||||||
|
|
@ -328,7 +328,7 @@ void CHypridle::onUnlocked() {
|
||||||
inhibitSleep();
|
inhibitSleep();
|
||||||
|
|
||||||
static const auto UNLOCKCMD = g_pConfigManager->getValue<Hyprlang::STRING>("general:on_unlock_cmd");
|
static const auto UNLOCKCMD = g_pConfigManager->getValue<Hyprlang::STRING>("general:on_unlock_cmd");
|
||||||
if (*UNLOCKCMD)
|
if (!std::string{*UNLOCKCMD}.empty())
|
||||||
spawn(*UNLOCKCMD);
|
spawn(*UNLOCKCMD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue