-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add grace period for the screen locker #143
Comments
This has already been discussed and rejected: #58, #50. If you want a grace period option, you can check out my own swaylock-effects where I merged (a modified version of) the |
swaylock doesn't monitor mouse and keyboard, some other program does it. What you want is a warning when the screen is about to be locked because of inactivity. That program which monitors user activity should give you a warning before starting swaylock. Then this grace feature doesn't need to be in swaylock.
Ideally, the screen shouldn't be locked at all while you are watching a video. Again, the program that monitors user activity should deal with it.
XScreenSaver does both activity monitoring and screen locking, so naturally it has all the relevant timeout options. |
it must not monitor mouse and keyboard for grace period
No warning must be shown. Just a timeout before lock. |
By "warning" I mean some kind of indication, not necessarily a warning message. What you want to happen when there is no user input is the following:
Swaylock is started at the step 3, and it does what needs to be done at that step. What's suggested in this feature request is that swaylock would be started at step 2 and handle things from there. I argue that it's not necessary to achieve the desired functionality. Screen blanking can be done with swaymsg, for example. I also think that blanking the screen is not the best option for step 2. When you are looking at the screen, you don't want it to suddenly go blank. You want to know when it's about to go blank and prevent that from happening. For example, where screen brightness can be changed programmatically, it's often reduced as a warning before going completely blank. And as I already said, when you are watching something, or in a video call, you don't want it to go even to step 2. This case should be automatically detected (but with possibility to trigger it manually) and screen blanking and locking should be avoided. It's possible to make a program that would handle all screen blanking and locking functions, and it's possible to build this functionality into a compositor/shell. But I think that swaylock was not meant to be this kind of program. Instead, its scope is narrow, and it can be used as a building block for a complete solution. |
agree
disagree, blanking the screen is the most notable "warning" when you are not looking at the monitor |
Folks, I think what is being discussed here is a "presentation mode" that temporarily inhibits any power saving / locking feature. It's included in Waybar, in case someone is using it (personally not tested). |
@apiraino Did you mean Waybar? Swaybar is here: https://github.com/swaywm/sway/tree/master/swaybar |
@shibe2 ... you're right 😅 (fixed my link above) |
This was already discussed in the past, and I'd rather not add this feature. Please consider contributing to a fork such as swaylock-effects if they are interested. Alternatively, maybe this could be implemented as a separate client, which uses the idle Wayland protocol and starts swaylock after a idle delay. |
This small client may be used to implement a grace period: https://git.sr.ht/~emersion/chayang |
Please consider a grace period for the screen locker, similar to the
lockTimeout
setting in xscreensaver. This allows for a certain amount of time to exit the screen lock without having to type in the password.One example where this may be useful is when watching a video or when in a conf call, when mouse and keyboard are idle for a longer period, but the screen should be visible. In that case, wiggling the mouse is much less intrusive than having to type in the password.
The xscreensaver option is documented as:
The text was updated successfully, but these errors were encountered: