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
320 B
14 lines
320 B
#!/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 |
|
} |
|
|
|
st -e sh -c "mmcli -m $(modem_n) && read"
|
|
|