Created
May 25, 2022 18:57
-
-
Save Zackariyya/4e892bc544b8c38ea6c51e8b68832b1a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from gi.repository import AppIndicator3 as appindicator | |
from gi.repository import Gtk as gtk | |
import subprocess | |
if __name__ == "__main__": | |
indicator = appindicator.Indicator.new("My Menu", "usr/share/icons/" , appindicator.IndicatorCategory.APPLICATION_STATUS) | |
indicator.set_status(appindicator.IndicatorStatus.ACTIVE) | |
menu = gtk.Menu() | |
OpenChrome = gtk.MenuItem("Open Google Chrome") | |
OpenChrome.connect("activate", subprocess.call(["/usr/bin/google-chrome"]) | |
exit.show() | |
menu.append(OpenChrome) | |
exit = gtk.MenuItem("Exit") | |
exit.connect("activate", gtk.main_quit()) | |
exit.show() | |
menu.append(exit) | |
menu.show() | |
indicator.set_menu(menu) | |
gtk.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment