-
Notifications
You must be signed in to change notification settings - Fork 70
X11/KDE Plasma: The icon doesn't show up #175
Copy link
Copy link
Open
Description
I do icon.run_detached(). It works fine on MacOS, but on Linux it would reserve a place in the system tray, but the icon wouldn't load.
My icon is load like this:
def gen_dot_img(size, color):
# Generate an image and draw a pattern
image = Image.new('RGBA', (size, size), (255, 0, 0, 0))
dc = ImageDraw.Draw(image)
dc.circle((size // 2, size // 2), size // 5, fill=color)
return image
def main():
# ...
dot_img_gray = gen_dot_img(64, 'gray')
icon = pystray.Icon(name, icon=dot_img_gray, menu=pystray.Menu(
pystray.MenuItem(text="Start/Stop Capture",
action=lambda _: root.event_generate("<<OCRWantToggle>>"), default=True),
pystray.MenuItem(text="Force Processing Once",
action=lambda _: root.event_generate("<<OCRWantForceOnce>>")),
pystray.MenuItem(
text="Exit", action=lambda _: root.event_generate("<<WantQuit>>"))
))
icon.run_detached()
# ...When I later close my form, I run icon.stop() which will result in "The function passed as setup to the icon did not finish within 5.0 seconds after icon was stopped".
I run my script from a distrobox Linux Mint container on a Debian host to replicate the environment of my friend, who runs Linux Mint natively. The icon loads for him, but not for me. :(
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels