File: systray.py

package info (click to toggle)
qtile 0.34.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,004 kB
  • sloc: python: 49,959; ansic: 4,371; xml: 324; sh: 260; makefile: 218
file content (21 lines) | stat: -rwxr-xr-x 392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3
"""
This creates a minimal system tray icon using GTK.

GTK sets the systray class via `--name <class>` like:

    python systray.py --name <class>

The window will close itself when clicked.
"""
# flake8: noqa

import gi

gi.require_version("Gtk", "3.0")
from gi.repository import Gtk

systray = Gtk.StatusIcon()
systray.connect("activate", Gtk.main_quit)

Gtk.main()