5

I have gone through the man page for notify-send and I am not able to understand following two options

-u, --urgency=LEVEL Specifies the urgency level (low, normal, critical).
-h, --hint=TYPE:NAME:VALUE
          Specifies basic extra data to pass. Valid types are int, double, string and byte.

I believe the only use of urgency is to display a high urgency notification even if low urgency is in queue. But what are hints? I don't find any more info on it. Type I understand, but where will the NAME:VALUE be used?

Apart from above, the -t option says, "timeout in milliseconds", but I see notifications stay longer than given value. The given value is not even hounored. e.g I gave -t 400. The notification should be dismissed after 400 ms, but it goes after about 5 secs.

Any info on above posed questions?

4

This is half-way at best, but perhaps you find some help in it.


There are two pieces to the puzzle notify-send and the notify-daemon or notification-server. Various implementations have various philosophies on what to include and how to use the different suggestions by the spec.

Implementations like NotifyOSD supply an option on the --expire-time with 0 or default -1. If value is 0 and alert box is used instead of notification, any other value is ignored – and server default used.

The --hint option can be used to send extra information on how to lay out custom alerts such as volume and brightness. For example:

notify-send "Vol" -i notification-audio-volume-medium -h int:value:55 -h string:x-canonical-private-synchronous:volume

show a volume notification with level set to 55.

As for the urgency level one thing, at least, is that it has an impact if other applications are running in full-screen mode. Games, video-player, (screen-saver?) etc. If Urgency level is low notifications are not displayed, if critical they are.

  • Example doesn't work any more (unless it's Unity specific, I use Gnome). – cprn Jul 18 '16 at 20:31
  • @CyprianGuerra: At time of answer I used Gnome as well. Not any GNOME desktop available at the moment, but works under Xfce, notify-send 0.7.6 – Runium Jul 31 '16 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.