Add warnings to modem scripts if the modem is not present

master
Miles Alan 4 years ago
parent b4c02acb76
commit fa3550c638
  1. 2
      scripts/core/sxmo_statusbar.sh
  2. 1
      scripts/core/sxmo_xinit.sh
  3. 4
      scripts/modem/sxmo_modemcall.sh
  4. 10
      scripts/modem/sxmo_modeminfo.sh
  5. 10
      scripts/modem/sxmo_modemmonitor.sh
  6. 4
      scripts/modem/sxmo_modemtext.sh

@ -12,7 +12,7 @@ touch $UPDATEFILE
while :
do
# M symbol if modem monitoring is on
# M symbol if modem monitoring is on & modem present
MODEMMON=""
pgrep -f sxmo_modemmonitor.sh && MODEMMON="M "

@ -7,7 +7,6 @@ xmodmap /usr/share/sxmo/xmodmap_caps_esc
xsetroot -mod 3 2 -fg '#000000' -bg '#888888'
xset s off -dpms
alsactl --file /usr/share/sxmo/default_alsa_sound.conf restore
sxmo_modemmonitor.sh &
#xset r off
# E.g. for PBP

@ -10,7 +10,9 @@ err() {
}
modem_n() {
mmcli -L | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2
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
}
contacts() {

@ -1,6 +1,14 @@
#!/usr/bin/env sh
err() {
echo -e "$1" | dmenu -fn Terminus-20 -c -l 10
exit
}
modem_n() {
mmcli -L | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2
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"

@ -2,9 +2,17 @@
TIMEOUT=3
LOGDIR=/home/$USER/.sxmo
ACTIVECALL="NONE"
trap "kill 0" SIGINT
err() {
echo -e "$1" | dmenu -fn Terminus-20 -c -l 10
kill -9 0
}
modem_n() {
mmcli -L | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2
MODEMS="$(mmcli -L)"
echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' > /dev/null || err "Couldn't find modem - is you're modem enabled?\nDisabling modem monitor"
echo "$MODEMS" | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2
}
newcall() {

@ -8,7 +8,9 @@ err() {
}
modem_n() {
mmcli -L | grep -oE 'Modem\/([0-9]+)' | cut -d'/' -f2
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
}
textcontacts() {

Loading…
Cancel
Save