here's a workaround to clear all past notify-send 's and apply a smaller timeout for current notification (warning: notifications will indeed be lost this way).
i simply wanted scripted notifications quick and dirty w/o accumulation... i'd prefer another solution, but after wasting too much time because of that "man notify-osd" dysfunctional -t reference i'm satisfied for now with below hack.
#!/bin/bash
#one-second-notify-send.sh
pkill notify-osd #shoot the messenger
notify-send $1 #this will start notify-osd again...
sleep 0.1 # habit
NPID=$(pgrep notify-osd) # grab current notify-osd process ID
sleep 0.9
kill -9 $NPID #shoot the messenger again, but only if instance we caused
#eof
here's a workaround to clear all past notify-send 's and apply a smaller timeout for current notification (warning: notifications will indeed be lost this way).
i simply wanted scripted notifications quick and dirty w/o accumulation... i'd prefer another solution, but after wasting too much time because of that "man notify-osd" dysfunctional -t reference i'm satisfied for now with below hack.
#!/bin/bash notify- send.sh
#one-second-
pkill notify-osd #shoot the messenger
notify-send $1 #this will start notify-osd again...
sleep 0.1 # habit
NPID=$(pgrep notify-osd) # grab current notify-osd process ID
sleep 0.9
kill -9 $NPID #shoot the messenger again, but only if instance we caused
#eof