This project demonstrates the use of GTK (GIMP Toolkit) in Python to create a system tray which on clicking shows a popup menu with different options and displays information based on user selections. In this example, we have two menu items: "Weather Report" and "Random Quote." Selecting each item shows relevant information in a GTK dialog.
Before running this application, ensure you have the following prerequisites installed on your system:
- Python 3.7 and above
- GTK 3 library (usually included with Linux distributions). Run
sudo apt install libgtk-3-dev
if not available - PyGObject - Python bindings for GObject introspection libraries.
-
Clone the repository to your local machine:
git clone https://github.com/wisdom209/gtk-3.git cd gtk-3
-
Install the needeed packages
pip install -r requirements.txt
python3 main.py
You will see a system tray icon with an associated popup menu. Double clicking on the system tray icon shows a popup menu. Clicking "Weather Report" or "Random Quote" will display relevant information in a dialog. Clicking on exit with shut down the system tray.
Project is dependent on external api and may break if these api endpoints are no longer valid
Ononiwu Ifeanyi Wisdom [email protected]