Add utility to send broadcast notifications
ClosedPublic

Authored by broulik on Dec 12 2016, 1:43 PM.

Details

Summary

This adds a command-line utility kbroadcastnotification that emits a signal on the system DBus listened to by Plasma's notifications dataengine, cf. [1]

[1] https://phabricator.kde.org/D3606

Test Plan
kbroadcastnotification --summary "Backup failed" --persistent --icon dialog-error --uids 1000,1337 "Please contact system administration for assistance."

Diff Detail

Repository
R126 KDE CLI Utilities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 8944.Dec 12 2016, 1:43 PM
broulik retitled this revision from to Add utility to send broadcast notifications.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R126 KDE CLI Utilities.
Restricted Application added a project: Plasma. · View Herald TranscriptDec 12 2016, 1:43 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Dec 13 2016, 11:12 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Dec 13 2016, 11:12 AM
bshah added a subscriber: bshah.Dec 13 2016, 11:15 AM
bshah added inline comments.
kbroadcastnotification/main.cpp
80

I wonder if it can take usernames instead of uids? It is slightly easier to remember usernames then uids

I wonder if it can take usernames instead of uids?

Perhaps not "instead" but in addition. The tool is mostly meant to be used by background services and scripts, so remembering should not be an issue but we can offer both. Will make a patch for the notifications dataengine.

This revision was automatically updated to reflect the committed changes.