summary refs log tree commit diff
path: root/bin/clear-notification
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2023-01-07 19:00:17 +0100
committerRobert Günzler <r@gnzler.io>2023-01-07 19:00:17 +0100
commitf7edee9e9cd37c4f7cec0c4538faddcf035de37f (patch)
treed0e5f3b5a25bcceaa7b99e5332bb2c3d7d976d02 /bin/clear-notification
parent55708bf1aa5dbe08fa1d37979dc290a737b2651b (diff)
bin: add connmenu and clear-notification
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/clear-notification')
-rwxr-xr-xbin/clear-notification11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/clear-notification b/bin/clear-notification
new file mode 100755
index 0000000..e58ddb2
--- /dev/null
+++ b/bin/clear-notification
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -eu
+if [ -z "$1" ]; then
+	printf "error: missing notification id\n" >&2
+	exit 1
+fi
+exec gdbus call --session \
+	--dest org.freedesktop.Notifications \
+	--object-path /org/freedesktop/Notifications \
+	--method org.freedesktop.Notifications.CloseNotification \
+	"$1" >/dev/null