~mil/sxmo-utils

07119a70853db89d2bb583acbb99ec910d7d1964 — Anjandev Momi 1 year, 4 months ago 63d5ec3
make dmenus with contact names case insensitive

Signed-off-by: Miles Alan <m@milesalan.com>
2 files changed, 3 insertions(+), 3 deletions(-)

M scripts/modem/sxmo_modemdial.sh
M scripts/modem/sxmo_modemtext.sh
M scripts/modem/sxmo_modemdial.sh => scripts/modem/sxmo_modemdial.sh +1 -1
@@ 20,7 20,7 @@ dialmenu() {
	NUMBER="$(
		printf %b "Close Menu\n$CONTACTS" | 
		grep . |
		sxmo_dmenu_with_kb.sh -l 10 -p Number -c -fn Terminus-20
		sxmo_dmenu_with_kb.sh -l 10 -p Number -c -fn Terminus-20 -i
	)"
	echo "$NUMBER" | grep "Close Menu" && kill -9 0


M scripts/modem/sxmo_modemtext.sh => scripts/modem/sxmo_modemtext.sh +2 -2
@@ 50,7 50,7 @@ sendtextmenu() {
	NUMBER="$(
		printf %b "\nCancel\n$(sxmo_contacts.sh)" | 
		awk NF |
		sxmo_dmenu_with_kb.sh -p "Number" -fn "Terminus-20" -l 10 -c |
		sxmo_dmenu_with_kb.sh -p "Number" -fn "Terminus-20" -l 10 -c -i |
		cut -d: -f1 |
		tr -d -- '-+ '
	)"


@@ 87,7 87,7 @@ main() {
			sxmo_contacts.sh | grep -m1 "$NUM" | xargs -IL echo "L logfile"
		done
	)"
	CONTACTIDANDNUM="$(printf %b "$ENTRIES" | dmenu -p Texts -c -fn Terminus-20 -l 10)"
	CONTACTIDANDNUM="$(printf %b "$ENTRIES" | dmenu -p Texts -c -fn Terminus-20 -l 10 -i)"
	echo "$CONTACTIDANDNUM" | grep "Close Menu" && exit 1
	echo "$CONTACTIDANDNUM" | grep "Send a Text" && sendtextmenu && exit 1
	tailtextlog "$(echo "$CONTACTIDANDNUM" | cut -d: -f1)"