hyprlock icon indicating copy to clipboard operation
hyprlock copied to clipboard

Allow passing grace time using cmdline args

Open HarshNarayanJha opened this issue 7 months ago • 2 comments

Description

We have the --immediate option to ignore any grace time set in the config. What if we add a --grace option to override the grace time defined in the config?

Example:

hyprlock --grace 5 Will lock with grace period set to 5 seconds.

I can make an MR if desired

HarshNarayanJha avatar May 16 '25 08:05 HarshNarayanJha

I have been thinking about this as well. I would even be in favor of removing grace from the config entirely, because a lot of people copy configurations with general:grace set without knowing what it does. Although that would be a breaking change.

Feel free to send a PR. And about --immediate: I would keep it, but now instead of influencing grace, it would be --no-fade-in + --immediate-render. That way it still expresses "I want to lock the screen ASAP". If we don't want that, we probably should remove --intimidate, which would be another breaking change.

Having grace specified as an argument with the default 0 seems more intuitive to me than what we have now.

PointerDilemma avatar May 21 '25 07:05 PointerDilemma

I will go ahead with just adding a --grace option to override the value in config for now. Then we can discuss other ideas like changing the behavior of --immediate and removing grace from config with the maintainer(s). I think those will have their own PR(s)

HarshNarayanJha avatar May 21 '25 08:05 HarshNarayanJha