Was bedeuten Benachrichtigungskategorie, Hinweis und Versionsparameter für das Senden von Benachrichtigungen?


18

Das notify-sendBefehlshandbuch sagt

Usage:
  notify-send [OPTION...] <SUMMARY> [BODY] - create a notification

Help Options:
  -?, --help                        Show help options

Application Options:
  -u, --urgency=LEVEL               Specifies the urgency level (low, normal, critical).
  -t, --expire-time=TIME            Specifies the timeout in milliseconds at which to expire the notification.
  -i, --icon=ICON[,ICON...]         Specifies an icon filename or stock icon to display.
  -c, --category=TYPE[,TYPE...]     Specifies the notification category.
  -h, --hint=TYPE:NAME:VALUE        Specifies basic extra data to pass. Valid types are int, double, string and byte.
  -v, --version                     Version of the package.

Bedeutung der letzten drei Parameter: category, hintund versionist mir unklar.


1
Ohne Zweifel ist "Parameter" versionam einfachsten zu erklären. :)
Jimmy

@jimmij Würdest du das dann so nett tun? :-) Welches Paket?
Ivan

2
paket libnotify. Renn einfach notify-send -v. -voder es --versionist eine Standardoption in der Linux-Welt, das Programm aufzufordern, seine interne Versionsnummer auszudrucken. Versuchen Sie es zum Beispiel ls --version.
Jimmy

Danke @jimmij, ich dachte, es ist ein weiterer Parameter, den ich angeben soll, wenn ich den Befehl aufrufe (wie eine Version des Skripts, das ihn aufruft, oder so ähnlich).
Ivan

Antworten:


7

Die manpage(in Debian GNU / Linux) schlagen vor, sich http://www.galago-project.org/specs/notification/ anzuschauen .

Ab Revision 0.9.

Kategorie

+------------------------------------------------------------------------+
   |          Type          |                  Description                  |
   |------------------------+-----------------------------------------------|
   | "device"               |   A generic device-related notification that  |
   |                        | doesn't fit into any other category.          |
   |------------------------+-----------------------------------------------|
   | "device.added"         | A device, such as a USB device, was added to  |
   |                        | the system.                                   |
   |------------------------+-----------------------------------------------|
   | "device.error"         | A device had some kind of error.              |
   |------------------------+-----------------------------------------------|
   | "device.removed"       |   A device, such as a USB device, was removed |
   |                        | from the system.                              |
   |------------------------+-----------------------------------------------|
   | "email"                |   A generic e-mail-related notification that  |
   |                        | doesn't fit into any other category.          |
   |------------------------+-----------------------------------------------|
   | "email.arrived"        | A new e-mail notification.                    |
   |------------------------+-----------------------------------------------|
   | "email.bounced"        | A notification stating that an e-mail has     |
   |                        | bounced.                                      |
   |------------------------+-----------------------------------------------|
   |                        |   A generic instant message-related           |
   | "im"                   | notification that doesn't fit into any other  |
   |                        | category.                                     |
   |------------------------+-----------------------------------------------|
   | "im.error"             | An instant message error notification.        |
   |------------------------+-----------------------------------------------|
   | "im.received"          | A received instant message notification.      |
   |------------------------+-----------------------------------------------|
   | "network"              |   A generic network notification that doesn't |
   |                        | fit into any other category.                  |
   |------------------------+-----------------------------------------------|
   |                        |   A network connection notification, such as  |
   | "network.connected"    | successful sign-on to a network service. This |
   |                        | should not be confused with device.added for  |
   |                        | new network devices.                          |
   |------------------------+-----------------------------------------------|
   |                        |   A network disconnected notification. This   |
   | "network.disconnected" | should not be confused with device.removed    |
   |                        | for disconnected network devices.             |
   |------------------------+-----------------------------------------------|
   | "network.error"        |   A network-related or connection-related     |
   |                        | error.                                        |
   |------------------------+-----------------------------------------------|
   |                        |   A generic presence change notification that |
   | "presence"             | doesn't fit into any other category, such as  |
   |                        | going away or idle.                           |
   |------------------------+-----------------------------------------------|
   | "presence.offline"     | An offline presence change notification.      |
   |------------------------+-----------------------------------------------|
   | "presence.online"      | An online presence change notification.       |
   |------------------------+-----------------------------------------------|
   |                        |   A generic file transfer or download         |
   | "transfer"             | notification that doesn't fit into any other  |
   |                        | category.                                     |
   |------------------------+-----------------------------------------------|
   | "transfer.complete"    | A file transfer or download complete          |
   |                        | notification.                                 |
   |------------------------+-----------------------------------------------|
   | "transfer.error"       | A file transfer or download error.            |
   +------------------------------------------------------------------------+

Standard-Hinweise

       +------------------------------------------------------------------------+
   |       Name       | Value Type |              Description               |
   |------------------+------------+----------------------------------------|
   | "urgency"        | byte       |   The urgency level.                   |
   |------------------+------------+----------------------------------------|
   | "category"       | string     |   The type of notification this is.    |
   |------------------+------------+----------------------------------------|
   |                  |            |   This specifies the name of the       |
   |                  |            | desktop filename representing the      |
   |                  |            | calling program. This should be the    |
   |                  |            | same as the prefix used for the        |
   | "desktop-entry"> | string     | application's .desktop file. An        |
   |                  |            | example would be "rhythmbox" from      |
   |                  |            | "rhythmbox.desktop". This can be used  |
   |                  |            | by the daemon to retrieve the correct  |
   |                  |            | icon for the application, for logging  |
   |                  |            | purposes, etc.                         |
   |------------------+------------+----------------------------------------|
   |                  |            |   This is a raw data image format      |
   |                  |            | which describes the width, height,     |
   | "image_data"     | (iiibiiay) | rowstride, has alpha, bits per sample, |
   |                  |            | channels and image data respectively.  |
   |                  |            | We use this value if the icon field is |
   |                  |            | left blank.                            |
   |------------------+------------+----------------------------------------|
   | "sound-file"     | string     |   The path to a sound file to play     |
   |                  |            | when the notification pops up.         |
   |------------------+------------+----------------------------------------|
   |                  |            |   Causes the server to suppress        |
   |                  |            | playing any sounds, if it has that     |
   | "suppress-sound" | boolean    | ability. This is usually set when the  |
   |                  |            | client itself is going to play its own |
   |                  |            | sound.                                 |
   |------------------+------------+----------------------------------------|
   |                  |            |   Specifies the X location on the      |
   | "x"              | int        | screen that the notification should    |
   |                  |            | point to. The "y" hint must also be    |
   |                  |            | specified.                             |
   |------------------+------------+----------------------------------------|
   |                  |            |   Specifies the Y location on the      |
   | "y"              | int        | screen that the notification should    |
   |                  |            | point to. The "x" hint must also be    |
   |                  |            | specified.                             |
   +------------------------------------------------------------------------+

Debian GNU / Linux-Fehler # 869277

Durch die Nutzung unserer Website bestätigen Sie, dass Sie unsere Cookie-Richtlinie und Datenschutzrichtlinie gelesen und verstanden haben.
Licensed under cc by-sa 3.0 with attribution required.