#!/usr/bin/env python3
import os
from PIL import Image
import pystray

png_file = "/usr/share/pdc/icons/pdc.png"

# Load the image
image = Image.open(png_file)


def script1():
    os.popen("~/.pdc/progressbar")

def script2():
    os.popen("/usr/share/pdc/notify/'PCLinuxOS Distro Choice'")

def script3():
    os.popen("~/.pdc/stop")

# Create a tray icon with mouse-over description
menu_items = [
    pystray.MenuItem("Progress", script1),
    pystray.MenuItem("About", script2),    
    pystray.MenuItem("Quit", script3)    
]

icon = pystray.Icon("pdc", image, menu=pystray.Menu(*menu_items), hover_text="PDC")
icon.run()


