Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize to system tray menu icon for desktop applications. #3846

Open
wtip opened this issue Dec 16, 2015 · 17 comments
Open

Minimize to system tray menu icon for desktop applications. #3846

wtip opened this issue Dec 16, 2015 · 17 comments
Labels
Type: Feature Issue is a feature request

Comments

@wtip
Copy link

wtip commented Dec 16, 2015

It would be great if there was a way to minimize desktop applicants to the system task tray.

@dessant dessant added the Type: Feature Issue is a feature request label Dec 19, 2015
@tshirtman tshirtman reopened this Dec 21, 2015
@PierBover
Copy link

Is this possible using Kivy for OSX and/or Windows?

@kawing-chiu
Copy link

+1 for this!!

@AliGhahraei
Copy link

Is anybody working on this?

@dessant
Copy link
Contributor

dessant commented Jan 25, 2017

We're not aware of anyone working on it.

@KeyWeeUsr
Copy link
Contributor

@AliGhahraei See this answer for Windows implementation. For the rest of platforms you'll need to find your own way, e.g. for linux there should be some Xserver/X11 api, probably even callable from console via xprop. On Mac there'll be some api call, I think I saw something recently, for that you'll need pyobjus. Android + iOS don't support this feature afaik.

@AliGhahraei
Copy link

@dessant I understand. Thank you.
@KeyWeeUsr That's really helpful. I appreciate your guidance.

I'll post a comment if I find a nice way to implement this that is worth sharing.

@Enteleform
Copy link

+1 for this feature, I'm currently working on a few utility apps that would benefit from this.
For example, apps like: Launchy, ClipboardFusion, KeyCue, etc.

Those types of apps really shouldn't be hanging out in the task bar.

Kivy-Garden > HotKeyBehavior seems like a good way to attain similar functionality, although a tray icon would still be nice to have since it provides a definite point of access.

@KeyWeeUsr
Copy link
Contributor

If the only problem for you is only a taskbar icon, look at garden.notification, the code for hiding works on win and linux. This behavior would make your app a "service"-like.

Regarding tray icon, I think the best guess might be checking sdl2 source first as I've seen some requests for this feature, though I'm not sure if the answer wasn't just using OS functions. If that's the case, the source code for WX python package could have the tray OS functions hopefully for all tray supporting platforms.

@erm3nda
Copy link
Contributor

erm3nda commented Mar 29, 2017

The wxWidgets is what i did (empty wx app wrapping) but mixing both GUI frameworks sounded a bit weird. I found the pystray (based on Gtk and/or X) and seems ok, cross-platform. Btw, tried a example following the docs but the icon won't show. This is the snipped i used https://pastebin.com/SjW8zsPp

@KeyWeeUsr
Copy link
Contributor

Who said to use wx directly? I said to use their code :P

@stale
Copy link

stale bot commented Oct 7, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 7, 2017
@Enteleform
Copy link

Enteleform commented Oct 7, 2017

This functionality is possible for Windows with:

@stale stale bot removed the stale label Oct 7, 2017
@erm3nda
Copy link
Contributor

erm3nda commented Feb 25, 2018

I found the pystray (https://pypi.python.org/pypi/pystray/) python module working (seems it works for both Windows and Linux). We don't need to extract anything, let python do it. It supports menu with actions, so it becomes really handy.

@AliGhahraei
Copy link

@erm3nda I tried pystray and it's exactly what I need. It also works on macOS, so that's what I'll use from now on.

@karolyi
Copy link

karolyi commented May 3, 2018

pystray needs pygobject, which in turn needs pycairo. on windows, getting that to run with python3 is a pain in the ass. since I only needed a windows system tray icon, I went with infi.systray.

@shaddeykatri
Copy link

Will pystray work as we close the window, it minimizes the window to the system tray just like utorrent.

@Saikyo0
Copy link

Saikyo0 commented Sep 2, 2023

I dont know about utorrent but pystray works perfectly for me: https://stackoverflow.com/a/77016681/15822465

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Issue is a feature request
Projects
None yet
Development

No branches or pull requests