summary refs log tree commit diff
path: root/bin/clear-notification
blob: e58ddb26e1933aa1a56945105d482ef2eb54879b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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