Show incoming contact name on ring; show texts in reverse chronological order

master
Miles Alan 5 years ago
parent 844ce9ddef
commit ad39251c5d
  1. 15
      scripts/core/sxmo_appmenu.sh
  2. 5
      scripts/modem/sxmo_modemtext.sh

@ -208,10 +208,17 @@ getprogchoices() {
# Decorate menu at top w/ incoming call entry if present # Decorate menu at top w/ incoming call entry if present
INCOMINGCALL="$(cat /tmp/sxmo_incomingcall || echo NOCALL)" INCOMINGCALL="$(cat /tmp/sxmo_incomingcall || echo NOCALL)"
echo "$INCOMINGCALL" | grep -v NOCALL && CHOICES=" if echo "$INCOMINGCALL" | grep -v NOCALL; then
Pickup $(echo "$INCOMINGCALL" | cut -d: -f2) ^ 0 ^ sxmo_modemcall.sh pickup $(echo "$INCOMINGCALL" | cut -d: -f1) CALLID="$(echo "$INCOMINGCALL" | cut -d: -f1)"
$CHOICES CALLNUM="$(echo "$INCOMINGCALL" | cut -d: -f2)"
" CALLCONTACT="$(sxmo_contacts.sh | grep -v "Unknown Number" | grep -m1 "$CALLNUM" | cut -d: -f2)"
CHOICES="
Pickup: $(
[ -n "$CALLCONTACT" ] && echo "$CALLCONTACT" || echo "$CALLNUM"
) ^ 0 ^ sxmo_modemcall.sh pickup $CALLID
$CHOICES
"
fi
# Decorate menu at bottom w/ system menu entry if not system menu # Decorate menu at bottom w/ system menu entry if not system menu
echo $WINNAME | grep -v Sys && CHOICES=" echo $WINNAME | grep -v Sys && CHOICES="

@ -80,8 +80,9 @@ main() {
# E.g. only display logfiles for directories that exist and join w contact name # E.g. only display logfiles for directories that exist and join w contact name
ENTRIES="$( ENTRIES="$(
printf %b "Close Menu\nSend a Text\n"; printf %b "Close Menu\nSend a Text\n";
for TDIR in "$LOGDIR"/*; do # shellcheck disable=SC2045
[ -d "$TDIR" ] || continue for TDIR in $(ls -1 -t "$LOGDIR"); do
[ -d "$LOGDIR"/"$TDIR" ] || continue
NUM="$(basename "$TDIR")" NUM="$(basename "$TDIR")"
sxmo_contacts.sh | grep -m1 "$NUM" | xargs -IL echo "L logfile" sxmo_contacts.sh | grep -m1 "$NUM" | xargs -IL echo "L logfile"
done done

Loading…
Cancel
Save