putting colors on some button.

Rainer Wirtz rainer.wirtz at gmx.de
Wed Mar 3 15:51:10 GMT 2004

Am Mittwoch, 3. März 2004 12:15 schrieb Her, Andre:
> Hello,
> I have a icon linked to a script that, once clicked start a ppp connection
> to my ISP. I also have another that do a 'disconnect'.
> I would like the icon's color changed to reflect the current state of the
> connection script such as  success(green) in progeress(yellow) failed (red)
> maybe inactive as well (blue)
> The scripts are bash scripts.
> Is there a way to do this ?

A different colour means a different icon. Change the icon (using sed or 
something comparable) in $HOME/Desktop/<name_of_your_desktop_entry>. There's 
a line "Icon=...". When I do this in an editor, the icon changes as soon as I 
save the file. When you do it using sed, you may have to tell kdesktop to 
refresh the icon. Try adding:

dcop kdesktop KDesktopIface refreshIcons

to your script.

This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

More information about the kde mailing list