-
Notifications
You must be signed in to change notification settings - Fork 89
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
[Feature] Tray icon support #82
Comments
I personally prefer software to not run in the background constantly, especially if I don't need it very often. But considering the startup time, which is especially slow for the exe-release on windows, I can understand if some people prefer to run it as a service. Therefore I'll take a look on this, but can't promise anything here, because I have no idea how difficult it is to implement this platform independently (which is one of the major goals for this project). Thanks for your suggestion! |
Well, we don't need to run as a service during startup. But a good suggestion is if it's executed once, it can stay at tray icon. The reason is that if a user has selected text recently. There is a high chance that he will again use the tool within a few minutes. We can consider it a design enhancement. Although as I said it will only go to tray icon when EXE file is executed manually. |
Hey @ashishpatel1992, while PyQt5 definitely could do that, I'll try to stay away from it. It's a too powerful (and bloated) framework, for such a tiny feature. For the same reason I'm currently using Tkinter as UI-Framework, which is less bloated and a default lib in Python. However, Tkinter (as far as I can tell) doesn't support tray icons. I'm currently experimenting if pystray can do the job :-) |
pystray conflicts with pyperclip (module for clipboard handling). I filed a simple PR which could help: asweigart/pyperclip#182 Waiting till it arrives upstream... |
Hi @dynobo , from pystray import Icon as icon, Menu as menu, MenuItem as item
from PIL import Image
state = False
im = Image.new(mode = "RGB", size = (200, 200), color = (153, 153, 255))
def on_clicked(icon, item):
global state
state = not item.checked
icon('test', im, menu=menu(item('Checkable',on_clicked,checked=lambda item: state))).run() and getting the following error
Do you have any idea about this error? I am testing it on Ubuntu 20.04.1 LTS |
@ashishpatel1992 : Your code-example works on my machine, I see the "icon" and don't get an error. My best guess is that you are missing a dependency. You could try to install the following stuff:
|
Hi @dynobo , |
Tray Icon Support arrived in the latest beta release 0.2.0-b1! Please help by testing and providing feedback. |
Hi @dynobo , |
Considered as solved with #116 |
Support for the
Tray icon
can be added so that the user is not always required to relaunch the application.The text was updated successfully, but these errors were encountered: