mortie / swaylock-effects

Swaylock, with fancy effects
MIT License
708 stars 45 forks source link

Delay asking for a password #16

Closed sojuz151 closed 4 years ago

sojuz151 commented 4 years ago

As discussed here: https://github.com/swaywm/swaylock/issues/50 Should be enough to merge this patch: https://github.com/swaywm/swaylock/compare/master...gdamjan:delay-password

mortie commented 4 years ago

Yeah, that looks good. I would prefer to have this kind of thing in upstream swaylock, but from the swaywm#50 issue you linked, that doesn't seem too likely.

The only scary part is that the delay-password branch adds a new short option -g. That'll be a problem if the upstream swaylock project ever adds a -g option which means something else. I think I may want to remove -g and leave only --grace.

mortie commented 4 years ago

Alright, I merged it in (with some changes): https://github.com/mortie/swaylock-effects/commit/c0f6b94f9f732429f23a8696578a1260c010ce13

mortie commented 4 years ago

https://github.com/mortie/swaylock-effects/commit/0a3fcf6760e5c1ec45879dcf59061f589f6e47c5 I made it such that a mouse event will also unlock the screen during the grace period.

I imagine the common use case for the grace feature will be together with swayidle, so it will probably feel weird to only be able to "abort" a lock with the keyboard and not with the mouse.