Cleanup logic for notification LED setting; increase default call volume

master
Miles Alan 4 years ago
parent 8e1c40e832
commit 45c571727c
  1. 6
      programs/sxmo_megiaudioroute.c
  2. 2
      scripts/modem/sxmo_modemcall.sh
  3. 8
      scripts/notifications/sxmo_notificationmonitor.sh

@ -351,9 +351,9 @@ static struct audio_setup audio_setup = {
.dai2_en = false,
.hp_vol = 15,
.spk_vol = 15,
.ear_vol = 15,
.hp_vol = 25,
.spk_vol = 25,
.ear_vol = 25,
.mic_gain = 1,
.hpmic_gain = 1,
};

@ -152,6 +152,8 @@ incallmenuloop() {
DTMF Tones ^ dtmfmenu $CALLID
Hangup ^ hangup $CALLID
"
pkill -9 dmenu # E.g. just incase user is playing with btns or hits a menu by mistake
echo "$CHOICES" |
xargs -0 echo |
cut -d'^' -f1 |

@ -11,8 +11,10 @@ notificationhook() {
if [ -x "$XDG_CONFIG_HOME"/sxmo/hooks/notification ]; then
"$XDG_CONFIG_HOME"/sxmo/hooks/notification
else
sxmo_setpineled green 0
sxmo_vibratepine 200;
sleep 0.1;
sxmo_setpineled green 1
sxmo_vibratepine 200;
sleep 0.1;
fi
@ -25,7 +27,6 @@ handlenewnotiffile(){
echo "Invalid notification file $NOTIFFILE found (<3 lines -- see notif spec in sxmo_notifwrite.sh), deleting!" >&2
rm -f "$NOTIFFILE"
else
sxmo_setpineled green 1;
notificationhook &
NOTIFACTION="$(awk NR==1 "$NOTIFFILE")"
NOTIFWATCHFILE="$(awk NR==2 "$NOTIFFILE")"
@ -33,6 +34,7 @@ handlenewnotiffile(){
if dunstify --action="2,open" "$NOTIFMSG" | grep 2; then
setsid -f sh -c "$NOTIFACTION" &
rm -f "$NOTIFFILE"
elif [ -e "$NOTIFWATCHFILE" ]; then
(inotifywait "$NOTIFWATCHFILE" && rm -f "$NOTIFFILE") &
fi
@ -48,7 +50,8 @@ recreateexistingnotifs() {
monitorforaddordelnotifs() {
while true; do
find "$NOTIFDIR"/ -type f -mindepth 1 | read -r || sxmo_setpineled green 0
[ $(find "$NOTIFDIR"/ -type f | wc -l) -lt 1 ] && sxmo_setpineled green 0
inotifywait -e create,attrib,moved_to,delete,delete_self,moved_from "$NOTIFDIR"/ | (
INOTIFYOUTPUT="$(cat)"
INOTIFYEVENTTYPE="$(echo "$INOTIFYOUTPUT" | cut -d" " -f2)"
@ -61,6 +64,5 @@ monitorforaddordelnotifs() {
pgrep -f "$(command -v sxmo_notificationmonitor.sh)" | grep -Ev "^${$}$" | xargs kill
rm -f $NOTIFDIR/incomingcall
sxmo_setpineled green 0
recreateexistingnotifs
monitorforaddordelnotifs

Loading…
Cancel
Save