38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# Bridge Sxmo hooks to the cover display daemon. Safe no-op on non-flip
|
|
# devices and when the daemon is not running.
|
|
set -u
|
|
EVENT="${1:-refresh}"
|
|
shift 2>/dev/null || true
|
|
[ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" = "flip" ] || exit 0
|
|
case "$EVENT" in
|
|
notification)
|
|
/usr/bin/bananarchy-coverctl NOTIFY "Notification" >/dev/null 2>&1 || true
|
|
;;
|
|
ring)
|
|
/usr/bin/bananarchy-coverctl CALL incoming "${1:--}" "-" >/dev/null 2>&1 || true
|
|
;;
|
|
missed)
|
|
/usr/bin/bananarchy-coverctl CALL missed "${1:--}" "-" >/dev/null 2>&1 || true
|
|
;;
|
|
call|active)
|
|
/usr/bin/bananarchy-coverctl CALL active "${1:--}" "-" >/dev/null 2>&1 || true
|
|
;;
|
|
hangup|ended)
|
|
/usr/bin/bananarchy-coverctl CALL none "-" "-" >/dev/null 2>&1 || true
|
|
;;
|
|
sms)
|
|
/usr/bin/bananarchy-coverctl SMS "${1:-1}" >/dev/null 2>&1 || true
|
|
;;
|
|
screenoff)
|
|
/usr/bin/bananarchy-coverctl REFRESH >/dev/null 2>&1 || true
|
|
;;
|
|
wake|refresh|theme)
|
|
/usr/bin/bananarchy-coverctl RELOAD_THEME >/dev/null 2>&1 || true
|
|
;;
|
|
*)
|
|
/usr/bin/bananarchy-coverctl REFRESH >/dev/null 2>&1 || true
|
|
;;
|
|
esac
|
|
exit 0
|