Open jigypeper opened 2 months ago
@jigypeper Can you try this? https://www.reddit.com/r/hyprland/comments/1cu67k1/how_i_can_setup_hyprlock_on_laptop_lid_clos/ And share your experiences?
Any idea what i need to suspend? I've got:
custom.conf:
bindl=,switch:Lid Switch, exec, hyprlock
hypridle.conf:
general { lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. before_sleep_cmd = hyprlock # lock before suspend. after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. }
I have simmilar issue, I found a pretty simple solution, but I don't know how to change the action that is performed when closing the laptop lid. Here is a small script to run instead of systemctl suspend, so that hyprlock can open before going to sleep.
#!/bin/bash loginctl lock-session sleep 3 systemctl suspend
Ml4W please reply where I can change the action when closing the lid.
Or how to add delay between before_sleep_cmd and suspend in hyprlidle, beacuse laptop instntly going to sleep and hyptlock dont have time to apper.
@daniij can you check this https://wiki.hyprland.org/Configuring/Binds/#switches
I have simmilar issue, I found a pretty simple solution, but I don't know how to change the action that is performed when closing the laptop lid. Here is a small script to run instead of systemctl suspend, so that hyprlock can open before going to sleep.
#!/bin/bash loginctl lock-session sleep 3 systemctl suspend
Ml4W please reply where I can change the action when closing the lid.Or how to add delay between before_sleep_cmd and suspend in hyprlidle, beacuse laptop instntly going to sleep and hyptlock dont have time to apper.
You can change the file here for testing: https://github.com/mylinuxforwork/dotfiles/blob/main/share/dotfiles/.config/hypr/hypridle.conf
Please share you're results because the file will be overwritten with the next update or you protect your changes with the hook.sh: https://github.com/mylinuxforwork/dotfiles/wiki/Hook-and-Post-Installation-Scripts#protecting-your-own-dotfiles-adjustments-with-hooksh
didn't work for me :(
I'm getting the same problem.
Describe the bug I don’t know if this happens to anyone else, but for me, if I close my laptop lid and open it up, hyperlock doesnt seem to engage for like half a second, I get to see the desktop and what was running before entering the password to actually unlock the screen. 🤔
To Reproduce Steps to reproduce the behavior:
Expected behavior Hyprlock should engage immediately, if someone else opens the laptop, they should not have a glimpse at whatever was running prior to you closing the lid.
Screenshots N/A
Distribution (please complete the following information):
Additional context This is running on a 2013 MacBook Air (pretty old machine, but Arch has brought it back to life).