From 9bd2bbd784c12b027bdc12b3d994e7771fc290bf Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Fri, 6 Mar 2026 20:51:29 +0100 Subject: [PATCH] Add `termux-notification-list -m`edia --- scripts/termux-notification-list.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/termux-notification-list.in b/scripts/termux-notification-list.in index 2015197..2af73e2 100644 --- a/scripts/termux-notification-list.in +++ b/scripts/termux-notification-list.in @@ -5,13 +5,16 @@ SCRIPTNAME=termux-notification-list show_usage () { echo "Usage: $SCRIPTNAME" echo "Show the list of currently shown notifications." + echo "m: Show the list of current medias." exit 0 } -while getopts :h option +media=false +while getopts :hm option do case "$option" in h) show_usage;; + m) media=true;; ?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1; esac done @@ -19,4 +22,9 @@ shift $((OPTIND-1)) if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi -@TERMUX_PREFIX@/libexec/termux-api NotificationList +if [ $media = false ] +then + @TERMUX_PREFIX@/libexec/termux-api NotificationList +else + @TERMUX_PREFIX@/libexec/termux-api NotificationList --esn media +fi