modemmonitor: fixed no contact name displayed in notifications and new folders without +

master
Anjandev Momi 4 years ago committed by Miles Alan
parent 4c24155a62
commit c94e58f6d2
  1. 10
      scripts/modem/sxmo_modemmonitor.sh

@ -47,7 +47,7 @@ checkformissedcalls() {
mkdir -p "$LOGDIR" mkdir -p "$LOGDIR"
printf %b "$TIME\tcall_missed\t$MISSEDNUMBER\n" >> "$LOGDIR/modemlog.tsv" printf %b "$TIME\tcall_missed\t$MISSEDNUMBER\n" >> "$LOGDIR/modemlog.tsv"
CONTACT="$(sxmo_contacts.sh | grep -E "^$MISSEDNUMBER")" CONTACT="$(sxmo_contacts.sh | grep -E "^\\$MISSEDNUMBER")"
sxmo_notificationwrite.sh \ sxmo_notificationwrite.sh \
random \ random \
"st -f Terminus-20 -e sh -c \"echo 'Missed call from $CONTACT at $(date)' && read\"" \ "st -f Terminus-20 -e sh -c \"echo 'Missed call from $CONTACT at $(date)' && read\"" \
@ -70,7 +70,7 @@ checkforincomingcalls() {
INCOMINGNUMBER=$(lookupnumberfromcallid "$VOICECALLID") INCOMINGNUMBER=$(lookupnumberfromcallid "$VOICECALLID")
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/ring" ]; then if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/ring" ]; then
"$XDG_CONFIG_HOME/sxmo/hooks/ring" "$(sxmo_contacts.sh | grep -E "^$INCOMINGNUMBER")" "$XDG_CONFIG_HOME/sxmo/hooks/ring" "$(sxmo_contacts.sh | grep -E "^\\$INCOMINGNUMBER")"
else else
sxmo_vibratepine 2500 & sxmo_vibratepine 2500 &
fi fi
@ -83,7 +83,7 @@ checkforincomingcalls() {
"$NOTIFDIR/incomingcall" \ "$NOTIFDIR/incomingcall" \
"sxmo_modemcall.sh pickup $VOICECALLID" \ "sxmo_modemcall.sh pickup $VOICECALLID" \
none \ none \
"Pickup - $(sxmo_contacts.sh | grep -E "^$INCOMINGNUMBER")" & "Pickup - $(sxmo_contacts.sh | grep -E "^\\$INCOMINGNUMBER")" &
echo "Number: $INCOMINGNUMBER (VOICECALLID: $VOICECALLID)" echo "Number: $INCOMINGNUMBER (VOICECALLID: $VOICECALLID)"
} }
@ -116,10 +116,10 @@ checkfornewtexts() {
random \ random \
"st -e tail -n9999 -f $LOGDIR/$NUM/sms.txt" \ "st -e tail -n9999 -f $LOGDIR/$NUM/sms.txt" \
"$LOGDIR/$NUM/sms.txt" \ "$LOGDIR/$NUM/sms.txt" \
"Message - $(sxmo_contacts.sh | grep -E "^$NUM:"): $TEXT" "Message - $(sxmo_contacts.sh | grep -E "^\\$NUM"): $TEXT"
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/sms" ]; then if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/sms" ]; then
"$XDG_CONFIG_HOME/sxmo/hooks/sms" "$(sxmo_contacts.sh | grep -E "^$NUM")" "$TEXT" "$XDG_CONFIG_HOME/sxmo/hooks/sms" "$(sxmo_contacts.sh | grep -E "^\\$NUM")" "$TEXT"
fi fi
done done
} }

Loading…
Cancel
Save