<filename>python/windows_overlay.py
import asyncio
import multiprocessing
import tkinter, win32api, win32con, pywintypes
from time import sleep


def generate_label():
    label = tkinter.Label(text='Recording', font=('', '40'), fg='#16A085', bg='#16A086')
    label.master.overrideredirect(True)
    label.master.geometry(f"-{50}+{50}")
    label.master.lift()
    label.master.wm_attributes("-topmost", True)
    label.master.wm_attributes("-disabled", True)
    label.master.wm_attributes("-transparentcolor", "#16A086")


    h_window = pywintypes.HANDLE(int(label.master.frame(), 16))
    ex_style = win32con.WS_EX_COMPOSITED | win32con.WS_EX_LAYERED | win32con.WS_EX_NOACTIVATE | win32con.WS_EX_TOPMOST | win32con.WS_EX_TRANSPARENT
    win32api.SetWindowLong(h_window, win32con.GWL_EXSTYLE, ex_style)
    return label


async def pack(label):
    label.pack()
    label.mainloop()


def run():
    f = asyncio.ensure_future(pack(generate_label()))
    f.cancel()

asyncio.run(run())