~mil/sxmo-utils

ref: b4686caa9c0176f2adbb926bd6db7f9b4f866976 sxmo-utils/scripts/modem/sxmo_modeminfo.sh -rwxr-xr-x 331 bytes
b4686caaStacy Harper Handle outgoing terminated calls as well 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env sh

err() {
	printf %b "$1" | dmenu -c -l 10
	exit
}

modem_n() {
	MODEMS="$(mmcli -L)"
	echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' > /dev/null || err "Couldn't find modem - is your modem enabled?"
	echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2
}

sxmo_terminal.sh sh -c "mmcli -m $(modem_n) && read"