I'm writing a program which notify user about something repeatedly with new message each time using notify-send
, but the problem is I want notifications to stay there for 5 seconds but it should be removed or deleted whenever new notification is created from notify-send.
Asked
Active
Viewed 773 times
0

Dheerendra
- 111
- 4
1 Answers
1
notify-send
does take a -t
argument for time:
-t, --expire-time=TIME
Specifies the timeout in milliseconds at which to expire the notification.
But you're at the mercy of whatever handles the notifications as to whether or not that's implemented.
I tried it on KDE with notify-send -t 5000 test
and the notification was on the screen for only three seconds. This may work in Ubuntu proper with notify-osd
but it may not. If you want to be certain, you'll have to implement your own notification system.

Oli
- 293,335
notify-osd
got awontfix
. It seems like a design decision to stop things hogging the screen excessively. – Oli Dec 18 '14 at 09:17notify-send -t 10000
stays up for about 10 seconds, plus the "minimum" time of about 1.5 seconds.-t 5
still stays for 1.5 seconds too. – Xen2050 Dec 18 '14 at 15:17