summaryrefslogtreecommitdiff
path: root/.local/bin/notify
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-18 20:21:50 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-18 20:21:50 +0100
commitfd2c508cde1393cbaf4d25abdf9eaebbe5f73895 (patch)
treedbb46663dc495da2ffdd5d7da66c2b6c38de5eb4 /.local/bin/notify
parentf8f144c9810fd6f16f843de4297cc20498a11291 (diff)
bin/sbin: Use the new ‘notify’ API
Diffstat (limited to '.local/bin/notify')
-rwxr-xr-x.local/bin/notify14
1 files changed, 7 insertions, 7 deletions
diff --git a/.local/bin/notify b/.local/bin/notify
index 39669fe..a87d3ab 100755
--- a/.local/bin/notify
+++ b/.local/bin/notify
@@ -1,18 +1,18 @@
#!/bin/sh
-if [ $# -lt 4 ]
+if [ $# -lt 2 ]
then
- echo "Usage: ${0##*/} short long summary body [args ...]" >&2
+ echo "Usage: ${0##*/} summary body [args ...]" >&2
exit 1
fi
if [ -t 2 ]
then
- printf "%s: %s\n" "$1" "$4" >&2
+ printf "%s: %s\n" "$NOTIFY_SHORT" "$2" >&2
else
- t="$(echo "$2" | tr a-z A-Z)"
- s="$3"
- b="$4."
- shift 4
+ t="$(echo "$NOTIFY_LONG" | tr a-z A-Z)"
+ s="$1"
+ b="$2."
+ shift 2
notify-send "$@" -a "$t" "$s" "$b"
fi