sxmo-utils/scripts/modem/sxmo_modeminfo.sh
noneofyourbusiness 1121e29b3e replace "st -e" with sxmo_terminal.sh and edit it to use st -e instead of st
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-04 21:50:59 +02:00

14 lines
331 B
Bash
Executable file

#!/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"