It's about notifications that show almost all applications from Rhythmbox to network connections. I wanted to be able to show my own in this form, and so I took the tambourine and began to drip)
first you need to install the libnotify-bin package, I launched the command under ubuntu
')
sudo apt-get install libnotify-bin
after that a little test. Check in the console
notify-send test
if you have such a window, then you can move on and understand the settings

notify-send [OPTION ...] [BODY] - create a notification
-u, --urgency = LEVELThere are not so many options here, low, normal, critical. The difference is only in the strip that appears on the left side.
-t, --expire-time = TIME Specifies the timeout in milliseconds.
Everything is clear here, we specify the time in milliseconds that the notice will hang on the screen.
-i, --icon = ICON [, ICON ...] Specifies an icon or display icon to display.
With the icon, too, everything is great, Firstly, you can directly specify the path to any image on the disk. Another option is to open / usr / share / icons / hicolor / 48x48 / apps / and select any one there and specify its name only without the notify-send -i pidgin test
-c, --category = TYPE [, TYPE ...] Specifies the notification category.
according to the idea, the task of the category should have given a result, but I believe it and did not notice it, so let's go further
-h, --hint = TYPE: NAME: VALUE Specifies the extra data to pass. Valid types are int, double, string and byte.
Hints provide a great opportunity to customize, for example, the location on the screen where the notice should appear-h int: x: 500 -h int: y: 500
now in the text, 2 texts are accepted, the first one goes to the cap, the second one is a body with little possibilities of hypertext

notify-send "Cap" "<b> bold <i> italic <a href=" aa.html"> link </a> "
after you have figured out the settings, a thought begins to arise at once, and where to apply it and the first is its own organizer. All the time they say that it is necessary to break away from the monitor every 45 minutes, it means there is a chance to do it. Step one is to write a small script.
#!/bin/sh
export DISPLAY=:0.0
PATH=/usr/bin/:/bin/
notify-send --urgency normal --expire-time=10000 -i typing-monitor -h int:x:500 -h int:y:500 " " " "
what is important here is DISPLAY, it does not see the crown in the emphasis and therefore the commands, although they will be executed, will not appear on the screen.
save set for execution and check
chmod a+x sh1.sh
./sh1.sh

Did you like the result? then it’s up to the crown setting
45 * * * * /home/rus/sh1.sh
here you go
For more information, visit
http://www.galago-project.org/specs/notification/0.9/x211.htmlCrossposting
http://mymans.org/2008/12/26/500Supplement from
spiritedflowAbout DISPLAY =: 0.0. Hard beat DISPLAY - not good. It may change from time to time, even if only one user is at the computer. In addition, if you closed the session and left, the kroner will still work and errors will pour in your mail.
It is better to define it automatically, for example, using the following function:
# get_display [USER] - Returns $ DISPLAY of USER.
# If first param is omitted, then $ LOGNAME will be used.
get_display () {
who \
| grep $ {1: - $ LOGNAME} \
| perl -ne 'if (m! \ (\: (\ d +) \) $!) {print ": $ 1.0 \ n"; $ ok = 1; last} END {exit! $ ok} '
}
And in the script to fix it like this (in one line it is impossible, since the export knocks down $?):
DISPLAY = $ (get_display) || exit
export DISPLAY