From 5b705dc91b5ef06268ed00cb22bbed40c754c2de Mon Sep 17 00:00:00 2001 From: baroque Date: Tue, 31 Aug 2021 11:21:05 +0200 Subject: [PATCH] reduce notification spam in volume/brightness Added a second parameter to notifications (actually a first, "app-name"), so they can be *grouped* when there is more than one, reducing the clutter on the screen, using the mako config parameter " group-by=app-name " with proper quotes (i hope), case and cute icon ;) added "group-by = app-name" directive in mako config Signed-off-by: Stacy Harper --- configs/appcfg/mako.conf | 1 + scripts/core/sxmo_brightness.sh | 2 +- scripts/core/sxmo_vol.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configs/appcfg/mako.conf b/configs/appcfg/mako.conf index 17277c5..5d160ee 100644 --- a/configs/appcfg/mako.conf +++ b/configs/appcfg/mako.conf @@ -3,6 +3,7 @@ background-color=#ffffff text-color=#000000 border-color=#000000 layer=overlay +group-by=app-name [urgency=low] default-timeout=3000 diff --git a/scripts/core/sxmo_brightness.sh b/scripts/core/sxmo_brightness.sh index 86588f5..4c3c7f4 100755 --- a/scripts/core/sxmo_brightness.sh +++ b/scripts/core/sxmo_brightness.sh @@ -5,7 +5,7 @@ . "$(dirname "$0")/sxmo_common.sh" notify() { - light | xargs notify-send + light | xargs notify-send " Brightness" } setvalue() { diff --git a/scripts/core/sxmo_vol.sh b/scripts/core/sxmo_vol.sh index 4b7bed9..aca0609 100755 --- a/scripts/core/sxmo_vol.sh +++ b/scripts/core/sxmo_vol.sh @@ -12,7 +12,7 @@ notify() { awk '{ s += $1; c++ } END { print s/c }' | xargs printf %.0f )" - dunstify -i 0 -u normal -r 998 "♫ $VOL" + dunstify -i 0 -u normal -r 998 "♫ Volume" "$VOL" sxmo_statusbarupdate.sh }