feat(idle): add lock-screen-off timeout setting#2397
feat(idle): add lock-screen-off timeout setting#2397kevclark wants to merge 4 commits intonoctalia-dev:mainfrom
Conversation
Allows monitors to be turned off after a short period of inactivity whilst the lock is active. Add a new 'lockScreenOffTimeout' setting that turns off monitors after a period of inactivity while the lock screen is active. Defaults to 0 (disabled). - Add IdleMonitor that activates when lock screen is active - Add 'Turn off screen while locked' row to Behaviour settings tab
|
Really nice work on this! The changes are clean and definitely improve the overall experience. As a suggestion, it would be great to have the option to enable or disable these features individually, instead of only being able to toggle all of them at once. This would add a lot more flexibility for users. |
|
@dinhokusanagi I hear what you're saying, I've just kept the controls the same as @ItsLemmy originally implemented. Setting any of these to 0 will disable them. Individual toggles is more intuitive but setting such fields to 0 is still fairly clear imho. |
I understand, thank you. |
Summary
Motivation
When a laptop or desktop locks, the monitors remain on indefinitely unless a separate screen-off timeout was already reached. This adds a dedicated post-lock screen-off stage, useful for privacy (screen blanked quickly after locking) and power saving.
Before moving to Noctalia I used swayidle to handle the post-lock screen-off:
Where locker.sh is a small guard script to prevent double-invocation:
The timeout 10 stage — checking if the locker is active and blanking the screen — is exactly what this feature replaces natively within noctalia's idle management.
An example use case with a lock timeout of 600s and a screen-off timeout of 610s. The lock screen activates at 600s; the monitors turn off 10s later. If the user wakes the screen from the lock screen (e.g. moves the mouse) but does not unlock the session, the screen-off timeout resets and it takes a full 610s for the monitors to turn off again. With lockScreenOffTimeout set to, say, 60s, the monitors will turn off after just 60s of inactivity on the lock screen — regardless of how many times the user wakes them.
Type of Change
Mark the relevant option with an "x".
Testing
Tested on
Screenshot
Checklist