import os
import gi
import signal

gi.require_version("Gtk", "3.0")
gi.require_version('AppIndicator3', '0.1')

from gi.repository import Gtk as gtk
from gi.repository import AppIndicator3 as appindicator

if __name__ == "__main__":
    signal.signal(signal.SIGINT, signal.SIG_DFL)

indicator = appindicator.Indicator.new('sample', 'dialog-information',
    appindicator.IndicatorCategory.SYSTEM_SERVICES)
indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
indicator.set_menu(gtk.Menu()) # required, otherwise the icon won't appear
indicator.set_label("foo", '')

gtk.main()
