You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

14 lines
322 B

#!/usr/bin/env sh
err() {
printf %b "$1" | dmenu
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"