[FEATURE] Check if lockscreen is active
Is your feature request related to a problem? Please describe. I like my screen to turn off sooner than usual when the screen is locked. Unless I'm mistaken, I can't currently find out whether it is or not via the quickshell IPC.
Describe the solution you'd like
Add a function (like isActive or isLocked) to the lock module IPC handler.
Additional context I don't mind adding this myself, but I wanted to create an issue first, just in case there's already a way to do this that I'm not aware of.
check /.config/hypr/hypridle.conf
Oh I already am for detecting whether I'm idle or not. I currently have it so that the screen turns off after 5 minutes of idle, but if the screen is locked I want the screen off after a shorter period of time. It may be a niche use case I don't know
listener {
timeout = 900 # 5mins
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
dpms is what you're looking for
I already had this in my hypridle config :
listener {
timeout = 300 # 5mins
on-timeout = "hyprctl dispatch dpms off"
on-resume = "hyprctl dispatch dpms on"
}
What I mean is to be able to do this :
listener {
timeout = 15
on-timeout = "[[ $(qs ipc call lock status) == 'locked' ]] && hyprctl dispatch dpms off"
on-resume = "hyprctl dispatch dpms on"
}
Where lock status returns whether or not the lock screen is active
I already had this in my hypridle config :
listener { timeout = 300 # 5mins on-timeout = "hyprctl dispatch dpms off" on-resume = "hyprctl dispatch dpms on" }What I mean is to be able to do this :
listener { timeout = 15 on-timeout = "[[ $(qs ipc call lock status) == 'locked' ]] && hyprctl dispatch dpms off" on-resume = "hyprctl dispatch dpms on" }Where
lock statusreturns whether or not the lock screen is active
So basically you want an ipc handler to return the lock status? I can do this pretty easily if you want it
Awesome thank you very much !