Updated fix-hyprlock script for new Lua function
This commit is contained in:
1 parent
16cf5e0c2e
commit
16f9e8d256
1 file changed
+23
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
instance="${HYPRLAND_INSTANCE_SIGNATURE:-0}"
|
||||
|
||||
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
|
||||
echo "Usage: $(basename "$0") [OPTIONS]"
|
||||
echo ""
|
||||
echo "Recover from a crashed Hyprlock screen in Hyprland using the Lua/eval API."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " (default) Allow session lock restoration and relaunch hyprlock"
|
||||
echo " -c, --clear Clear the crashed lockscreen state and return to desktop"
|
||||
echo " -h, --help Show this help message"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$1" == "--clear" || "$1" == "-c" ]]; then
|
||||
killall -9 hyprlock
|
||||
hyprctl --instance "$instance" eval 'hl.clear_crashed_lockscreen()'
|
||||
else
|
||||
hyprctl --instance "$instance" eval 'hl.config({ misc = { allow_session_lock_restore = true } })'
|
||||
hyprctl --instance "$instance" eval 'hl.dispatch(hl.dsp.exec_cmd("hyprlock"))'
|
||||
fi
|
||||
Reference in new issue
Block a user