-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
fix: remove cause of hyprlock crashing (caused by multiple instances of hyprlock running) + misc. Hypridle.conf changes #309
Conversation
…es running) Also added optional Display Timeouts to hypridle.conf (commented out by default)
# unlock_cmd = notify-send "unlock!" # same as above, but unlock | ||
before_sleep_cmd = hyprlock # command ran before sleep | ||
# after_sleep_cmd = notify-send "Awake!" # command ran after sleep | ||
lock_cmd = pidof hyprlock || hyprlock # runs hyprlock if it is not already running (this is always run when "loginctl lock-session" is called) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lock_cmd = pidof hyprlock || hyprlock # runs hyprlock if it is not already running (this is always run when "loginctl lock-session" is called) | |
lock_cmd = pidof hyprlock || hyprlock --immediate # runs hyprlock if it is not already running (this is always run when "loginctl lock-session" is called) |
Else there is a bit delay when locking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just kept it like it was in the listener beforehand.
I thought the flag was just to skip the grace period defined in the hyprlock.conf
.
I might be slightly biased as it is a needed feature for me since I personally disable the notifications before locking and have my grace period set to 10 seconds so I can unlock it again fast if I am just sitting there doing nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues, for me the flag helps mitigate the issue where if I quickly move my mouse right after executing hyprlock
, the session does not lock properly and quickly unlocks itself.
I am using hyprlock or hypridle configs provided by these dots without any modification.
This very well could be a upstream bug though.
EDIT: this is intended as can be seen from the logs
[LOG] In grace and cursor moved more than 5px, unlocking!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues, for me the flag helps mitigate the issue where if I quickly move my mouse right after executing
hyprlock
, the session does not lock properly and quickly unlocks itself.I am using hyprlock or hypridle configs provided by these dots without any modification.
This very well could be a upstream bug though.
EDIT: this is intended as can be seen from the logs
[LOG] In grace and cursor moved more than 5px, unlocking!
but the unlock immediately was because of grace period aint it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, both for grace period and cursor moving.
hey guys.. I will be busy this week so I can only review / merge once I verify / test looking at this closed issues on hyprlock https://github.com/hyprwm/hyprlock/issues?q=is%3Aissue+is%3Aclosed most of Vaxry's reply was a bug in hyprland, which is fixed on upstream.... I suggest to install hyprland-git or from source and test the normal hyprlock command without going around... Id rather wait for the fix than trying to get around with it because then we are just inviting all the unnecessary bugs again that might come along due to unnecessary codes / work around |
I have those parts of the script from the example in the official hyprland wiki and used this with the Arch-stable packages for some time already. It was best practice at some point. Maybe it still is or it might be redundant now and the wiki is out of date... I changed over to the -git packages for now and will test the change. |
Cool.. let me know outcome of you your test... actually for the past few days, even on my gentoo, I havent seen any issues on hyprlock / hypridle... same on my Arch with hyprland-git version.... |
any comment / change in here? |
i tried both the old and new config with the git packages and both work as they should. so you could just close this if you like. But i still think calling hyprlock via lock_cmd feels better, as long as you don't want to send extra args like you do in |
I have now removed the --immediate command and just leave the -q can you explain about what you said calling hyprlock via lock_cmd? |
I agree. Please rebase this PR on top of |
weird..... my screen is not locking if I execute command loginctl lock-session ... am I missing something? lmao |
@JohnRTitor you don't need to set that in the I feel like the only time a normal user wants to lock immediately is when locking manually (eg. pressing See the description of the
|
You need to apply the changes in this PR to |
yeah hypridle has no way to re-parse the config after it is started. |
Pull Request
Description
changed hypridle.conf and LockScreen.sh so hyprlock won't be called if it is already running, as that renders all hyprlock instances useless. (checkable by pressing Ctrl + Alt + L twice, only killall hyprlock fixes this.)
"loginctl lock-session" now calls hyprlock and "loginctl unlock-session" kills hyprlock. (in case someone has a program that calls the generic commands or follows am online guide in tty or something if they are having problems with hyprlock)
Add a automatic hyprlock call when going to sleep as well as turning the screen on after waking up.
Copied 2 listeners to turn off the screen from my personal config. One after locking the display and the other doing this faster in case hyprlock is already running.
I commented out the 2 listeners as they would change the default behavior.
Type of change
Please put an
x
in the boxes that apply:Checklist
Please put an
x
in the boxes that apply:Additional context
Add any other context about the problem here.