From 36520d487ea5278e29c559a548f642cd717a4e8e Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Sat, 18 Jul 2020 10:37:28 -0500 Subject: [PATCH] Change ring hook location to ~/.config/sxmo/hooks/ring --- scripts/modem/sxmo_modemmonitor.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/modem/sxmo_modemmonitor.sh b/scripts/modem/sxmo_modemmonitor.sh index f10cda4..6283df3 100755 --- a/scripts/modem/sxmo_modemmonitor.sh +++ b/scripts/modem/sxmo_modemmonitor.sh @@ -20,12 +20,6 @@ modem_n() { echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2 } -ring() { - action="sxmo_vibratepine 2000 & sxmo_setpineled green 1" - [[ -x "$XDG_CONFIG_HOME/sxmo/ringing" ]] && action="$XDG_CONFIG_HOME/sxmo/ringing" - ${action} -} - checkforincomingcalls() { VOICECALLID="$( mmcli -m "$(modem_n)" --voice-list-calls -a | @@ -38,7 +32,11 @@ checkforincomingcalls() { return fi - ring + if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/ring" ]; then + "$XDG_CONFIG_HOME/sxmo/hooks/ring" + else + sxmo_vibratepine 2000 & sxmo_setpineled green 1 + fi # Delete all previous calls which have been terminated calls for CALLID in $(