From 02241e4f8b7de21ef90237a8ca60e904c5e034cf Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 4 Dec 2023 17:07:51 +0100 Subject: notify: Only append period if message doesn’t end in punctuation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .local/bin/notify | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.local/bin/notify') diff --git a/.local/bin/notify b/.local/bin/notify index a87d3ab..fce103d 100755 --- a/.local/bin/notify +++ b/.local/bin/notify @@ -12,7 +12,9 @@ then else t="$(echo "$NOTIFY_LONG" | tr a-z A-Z)" s="$1" - b="$2." + b="$2" + c="${b##*[![:punct:]]}" + [ -z "$c" ] && b="$2." shift 2 notify-send "$@" -a "$t" "$s" "$b" fi -- cgit v1.2.3