From 317437572a0173b96e2ed47261837397721b2a74 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Sat, 22 Aug 2020 16:02:45 -0500 Subject: [PATCH] Improve default notificationhook to vibrate consistently --- scripts/notifications/sxmo_notificationmonitor.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/notifications/sxmo_notificationmonitor.sh b/scripts/notifications/sxmo_notificationmonitor.sh index b581b9c..fa211e3 100755 --- a/scripts/notifications/sxmo_notificationmonitor.sh +++ b/scripts/notifications/sxmo_notificationmonitor.sh @@ -11,12 +11,16 @@ notificationhook() { if [ -x "$XDG_CONFIG_HOME"/sxmo/hooks/notification ]; then "$XDG_CONFIG_HOME"/sxmo/hooks/notification else + VIBS=5 + VIBI=0 + while [ $VIBI -lt $VIBS ]; do sxmo_setpineled green 0 - sxmo_vibratepine 200; - sleep 0.1; + sleep 0.1 + sxmo_vibratepine 400 & sxmo_setpineled green 1 - sxmo_vibratepine 200; - sleep 0.1; + sleep 0.4 + VIBI=$(echo $VIBI+1 | bc) + done fi }