jaredks / rumps

Ridiculously Uncomplicated macOS Python Statusbar apps
BSD 3-Clause "New" or "Revised" License
3.09k stars 179 forks source link

Is it possible to update icon in status bar? #119

Closed mountwebs closed 5 years ago

mountwebs commented 5 years ago

Hi! Is it possible to update the icon in the status bar? I am trying to make an app that updates the icon every x seconds, but I can't make it work. Help is much appreciated!

jaredks commented 5 years ago

Definitely! Try this,

import rumps

app = rumps.App('Test Change Icon', ':)')

@rumps.timer(2)
def change(_):
    app.title = ':(' if app.title == ':)' else ':)'

app.run()