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
339 B

#!/usr/bin/env sh
err() {
echo -e "$1" | dmenu -fn Terminus-20 -c -l 10
exit
}
modem_n() {
MODEMS="$(mmcli -L)"
echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' > /dev/null || err "Couldn't find modem - is you're modem enabled?"
echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2
}
st -e sh -c "mmcli -m $(modem_n) && read"