On 12/03/2011 02:28 PM, Frank Murphy wrote: > On 03/12/11 09:31, Christoph Wickert wrote: > > >>> >>> No joy. Can yo send me a filled in link for "notifier"? >> >> http://lists.fedoraproject.org/pipermail/xfce/2011-November/000841.html >> >> Regards, >> Christoph > > The one thing, I have changed in the script since using is: > > from: > updates=$( yum check-update ) > > to: > updates=$( yum check-update -q) > > # so a not to leave a panel of gibberish, if the repos, > # or mirrormanager have a breakdown. > > > > Regards, > > Frank Murphy
Hi Frank, Thank you for the "-q" tip! :-) I took some liberties with your script. My email client clips sentences that are too long, so anyone using this will have to joins lines where they got clipped. Attached below: -T $cat genmon-yum.sh #!/bin/bash # Reference: http://lists.fedoraproject.org/pipermail/xfce/2011-November/000841.html # From "man yum" # check-update # Implemented so you could know if your machine had any updates # that needed to be applied without running it interactively. # Returns exit value of 100 if there are packages available for an # update. Also returns a list of the packages to be updated in # list format. Returns 0 if no packages are available for update. # Returns 1 if an error occurred. # Dependencies: Oxygen icons # gpk-update-viewer (yum install gnome-packagekit) updates=$( yum check-update -q ) status=$? if [ $status = 100 ] then echo -e "<img>/usr/share/icons/oxygen/22x22/emblems/emblem-important.png</img>" echo -e "<tool>Updates Available</tool>" echo -e "<click>gpk-update-viewer</click>" elif [ $status = 1 ] then echo -e "<img>/usr/share/icons/oxygen/22x22/status/script-error.png</img>" echo -e "<tool>the script returned an error</tool>" echo -e "<click>gpk-update-viewer</click>" elif [ $status = 0 ] then echo -e "<img>/usr/share/icons/oxygen/22x22/actions/dialog-ok.png</img>" echo -e "<tool>all updates applied</tool>" echo -e "<click>gpk-update-viewer</click>" else echo -e "<img>/usr/share/icons/oxygen/22x22/actions/dialog-cancel.png</img>" echo -e "<tool>status is unknown</tool>" echo -e "<click>gpk-update-viewer</click>" fi _______________________________________________ xfce mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/xfce
