summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-12-04 17:07:51 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-12-04 17:07:51 +0100
commit02241e4f8b7de21ef90237a8ca60e904c5e034cf (patch)
tree99487f8538f43af4fcd0d9047ef991c0d4f05337 /.local/bin
parent01457518c1f4c3c80e43c7fa87e2f6378a5480a1 (diff)
notify: Only append period if message doesn’t end in punctuation
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/notify4
1 files changed, 3 insertions, 1 deletions
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