sxmo: fix inputhandler hook loic errors

This commit is contained in:
Colin 2023-09-23 09:36:16 +00:00
parent 07c3fd8941
commit 130901d7f7

View File

@ -35,8 +35,7 @@ handle_with() {
# - "lock" => display on but touchscreen disabled
# - "proximity{lock,unlock}" => intended for when in a phone call
case "$STATE" in
"unlock")
if [ "$STATE" = "unlock" ]; then
case "$ACTION" in
# powerbutton_one: intentional default to no-op
# powerbutton_two: intentional default to screenoff
@ -65,20 +64,19 @@ case "$STATE" in
handle_with sxmo_terminal.sh
;;
esac
;;
fi
"lock"|"screenoff")
if [ "$STATE" = "screenoff" ]; then
case "$ACTION" in
"powerbutton_two")
# power twice => toggle media player
handle_with playerctl play-pause
;;
esac
;;
fi
*)
# default actions
case "$ACTION" in
# default actions
case "$ACTION" in
"powerbutton_one")
# power once => unlock
handle_with sxmo_state_switch.sh set unlock
@ -108,8 +106,7 @@ case "$STATE" in
"voldown_three")
handle_with sxmo_audio.sh vol down "$VOL_INCR_3"
;;
esac
;;
esac
handle_with echo "no-op"