Tray icons for a running script


PowerGod

Forum Addict!
Joined
Jun 20, 2011
Messages
4,468
How can I add an icon on the tray bar while a bash script is running ?
 
thanks, I'll try this


looking at the code this seems to show a progress bar ? Cause if this is the case it is not exactly what I need... anyway I need some trials first
 
Last edited by a moderator:
Yeah it shows a progress bar, but it a quick and dirty way to give a visual queue that your script is running.


Basically at the beginning of your script you do:


echo 0 | zenity --progress --auto-close


That will pop up a window with a 0% progress bar and a tray icon.


echo N | zenity --progress --auto-close


at various points in your script will update the progress bar.


echo 100 | zenity --progress --auto-close


at the end of the script will close the progress bar window, and remove the tray icon.


That is unless you're looking for an icon for the notification area near the clock. That's a different ballgame.
 
Thanks for the explanation, I didn't have a clear idea where that icon was to be shown really, I was just thinking to make visible somewhere that the script is running ^_^


I will try this first, maybe it does the job in the easy way
 
I guess I could rip out some parts from my configbutton daemon and make it usable from a script to create a tray icon, if anyone wants it.
 
@mindlord: tried the commands, and it is not exactly what I need, my script is endless until manually stopped, so that indicator is not exactly for this purpose


@slaeshjag: if it will works like the bluetooth icon that appear on the bar after the activation (and maybe also disappear after deactivation), can be very useful to me, but then the 2 programs will be dependent, right ?


anyway the script I'm working on is this http://boards.openpa...or/#entry155790


(the only functional solution I've found to the disconnection problem when I need to connect to routers that are not mine to configure)
 
Last edited by a moderator:
Back
Top