commit 24663a4838ac1b57d594872547ee0876805c10e8 parent ef1bb0f84befc7572cd1e3ac086ea93381a4d908 Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Sun, 26 Feb 2023 11:36:29 -0800 Allow message bodies in notify script Diffstat:
| M | local/bin/bin/notify | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/local/bin/bin/notify b/local/bin/bin/notify @@ -5,7 +5,7 @@ usage() { echo "${1:+error: $1 -}usage: ${0##*/} [-i image] [-v progress] [-u urgency] message" 1>&2 +}usage: ${0##*/} [-i image] [-v progress] [-u urgency] subject [message]" 1>&2 exit 1 } @@ -29,9 +29,10 @@ do done case "$#" in -(1) m="$1" ;; +(1) s="$1" ;; +(2) s="$1"; m="$2" ;; (*) usage 'No message' ;; esac # The targeted backend is currently dunst(1) -notify-send ${image:+-i "$image"} ${level:+-u "$level"} ${value:+-h int:value:"$value"} "$m" +notify-send ${image:+-i "$image"} ${level:+-u "$level"} ${value:+-h int:value:"$value"} "$s" ${m:+"$m"}