From 03784b2024436827de25515b1d85d9ffdde40745 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 18:03:29 +0200 Subject: feat(notify): materialise notification images Notify resolves app_icon and image-path theme names, decodes image-data to a PNG under the image directory, and re-publishes the entry with its image path. The daemon advertises body-images, and removeImage refuses to touch a path outside its own directory so a client's screenshot file is never deleted. --- test-notifyctl.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test-notifyctl.sh') diff --git a/test-notifyctl.sh b/test-notifyctl.sh index 7018e2a..e91307a 100755 --- a/test-notifyctl.sh +++ b/test-notifyctl.sh @@ -51,6 +51,9 @@ dbus-run-session -- bash -c ' notify-send -a test -u normal "t1" "b1" || exit 3 sleep 0.3 echo "$(notifyctl list | grep -c "\"summary\": \"t1\"")" + notify-send -a test -u normal --hint=string:image-path:/tmp/x.png "t2" "b2" || exit 3 + sleep 0.3 + echo "$(notifyctl list | grep -c "\"image\": \"/tmp/x.png\"")" notifyctl close-all sleep 0.3 echo "$(notifyctl list | grep -c "\"summary\": \"t1\"")" @@ -58,7 +61,8 @@ dbus-run-session -- bash -c ' ' _ "$tmp" > "$tmp/out" 2>"$tmp/err" check "list shows the notification" "1" "$(sed -n 1p "$tmp/out")" -check "close-all empties the live queue" "0" "$(sed -n 2p "$tmp/out")" +check "image-path is published" "1" "$(sed -n 2p "$tmp/out")" +check "list clears" "0" "$(sed -n 3p "$tmp/out")" check "no errors on stderr" "" "$(cat "$tmp/err")" printf '\n%d passed, %d failed\n' "$pass" "$fail" -- cgit v1.2.3