I’m creating a indicator applet using Python (pygtk) and I have a function that looks for a process. I need the item in the menu to be able to change while still running the script.
The item in the menu should kill or start a process, based on if it’s running or not.
Also, I want a text-only item to change while running, but this one should continually change to show the latest row from a text file.
How do I update the items in the code without restarting the script?
See code here: https://github.com/danielholm/BareShare/blob/master/bareshare.py
Thanks in advance
I got it working now.
You can use set_label() anytime, and since GTK main keeps looping over and over, you can use a code to update the label at a set time: