diff --git a/test-notifs.sh b/test-notifs.sh new file mode 100755 index 0000000..fc9e1dc --- /dev/null +++ b/test-notifs.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +# Spam a variety of notifications for visual testing. +# Usage: ./test-notifs.sh [delay_ms] (default 400ms between each) + +DELAY=${1:-0.4} + +n() { + notify-send "$@" + sleep "$DELAY" +} + +# --- Short --- +n -a "MiniTrue" "Thoughtcrime detected" "Facial expression logged" +n -a "Telescreen" "Mandatory viewing" "Hate Week starts in 2 minutes" +n -a "Ration Portal" "Chocolate ration increased" "From 30g to 25g" + +# --- Longer body --- +n -a "Ministry of Truth" "History correction complete" \ + "All records referencing Oceania's prior alliance with Eurasia have been updated. The past has always been as it is now. No further action required." + +n -a "Thoughtpolice" "Citizen Report #4471-B" \ + "Your neighbor in flat 7C was observed purchasing two (2) oranges despite the citrus allocation freeze. A correction officer has been dispatched. Thank you for your continued vigilance. Big Brother is grateful." + +# --- Urgent --- +n -a "Ministry of Peace" -u critical "War update" "Oceania has always been at war with Eastasia" +n -a "Thoughtpolice" -u critical "Doubleplusgood alert" "Unauthorized smile detected in Sector 7. Report to Room 101 immediately." +n -a "Telescreen" -u critical "Two Minutes Hate" "Beginning NOW. Participation is mandatory." + +# --- Low urgency --- +n -a "Ministry of Plenty" -u low "Production surplus" "Boot production up 1700% (unverified)" +n -a "Social Credit Bureau" -u low "Score updated" "+2 for attending voluntary rally" + +# --- With actions --- +n -a "Ministry of Love" "Wellness check scheduled" "A correction session has been booked for you on Thursday." \ + --action="confirm=Confirm attendance" --action="reschedule=Reschedule (not recommended)" + +n -a "Thoughtpolice" "Confession form ready" "Pre-filled for your convenience. Please review and sign." \ + --action="sign=Sign" --action="amend=Request amendment (flagged)" + +n -a "Newspeak Dictionary" "Update available" "438 words have been deprecated. Vocabulary reduced by 12%." \ + --action="install=Install now" --action="later=Later (doubleplusungood)" + +# --- Same app cluster (grouping test) --- +n -a "Telescreen" "Reminder" "Smile" +n -a "Telescreen" "Reminder" "Smile more" +n -a "Telescreen" "Reminder" "You are being watched" +n -a "Telescreen" "Reminder" "Big Brother loves you" +n -a "Telescreen" "Alert" "Unauthorized frown detected in flat 4B. Logging." + +# --- Another cluster --- +n -a "Ministry of Truth" "Rectification complete" "The predicted wheat yield for Q3 has been updated to match actual output." +n -a "Ministry of Truth" "Rectification complete" "Comrade Ogilvy added to historical record. Always existed." +n -a "Ministry of Truth" "Rectification complete" "All references to Comrade Withers purged. Never existed." + +# --- Mixed urgency same app --- +n -a "Social Credit Bureau" -u low "Daily report" "Compliance score: 94.7 — satisfactory" +n -a "Social Credit Bureau" -u critical "Score threshold breach" "Score dropped below 80. Travel privileges suspended pending review." + +# --- No body --- +n -a "Thoughtpolice" "We see you." + +# --- No icon app --- +n -a "Inner Party Bulletin" "For your eyes only" "Proles remain pacified. Gin ration maintained." + +# --- Long app name --- +n -a "Ministry of Peace Department of Voluntary Warfare Coordination" "New assignment" "Report to the front. It is an honor." + +echo "done — $(date)"