Files
spotify-gui/_notify.py
Brandon4466 4467115135 added notifications
added freepbx integration as notification source
2023-08-11 02:17:41 -07:00

30 lines
797 B
Python

import tkinter as ttk
from tkinter import ttk as tk
from tkinter import PhotoImage
import os
import sv_ttk
def draw(cid, num, img, title="Notification"):
root = ttk.Tk()
root.title(title)
root.geometry("1280x50")
root.attributes("-topmost", True)
if os.name == 'posix':
root.overrideredirect(1)
try:
sv_ttk.use_dark_theme()
except:
pass
phone = PhotoImage(file=img)
phone_image = tk.Label(root, image=phone)
cid_label = tk.Label(root, text=cid, font=("Arial", 32))
num_label = tk.Label(root, text=num, font=("Arial", 32))
phone_image.grid(row=0, column=0, padx=10)
cid_label.grid(row=0, column=1, padx=10)
num_label.grid(row=0, column=2, padx=10)
root.after(15000, lambda: root.destroy())
root.mainloop()