hyprwm / hypridle

Hyprland's idle daemon
BSD 3-Clause "New" or "Revised" License
320 stars 16 forks source link

I would want to run a command upon unlock #56

Closed se7en-x230 closed 1 month ago

se7en-x230 commented 1 month ago

Hyperland-git Arch

I can't get a command to run not even notify-send upon unlock. Can someone push me in the right directions please?

yawor commented 1 month ago

I don't think hypridle is the right place for this. It doesn't even know that you've successfully unlocked the lock screen. The unlock_cmd configuration option is for unlocking from loginctl command. I think this should rather be something that your lock screen does. I've checked hyprlock and it doesn't have such option. Maybe you could do it using a script, which would first execute hyprlock and wait for it to exit, and then do whatever you want after the hyprlock exits. Then in lock_cmd use the script instead of executing hyprlock directly. You could also do something like this:

lock_cmd = hyprlock && notify-send "Welcome back"