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

Make possible to trigger an action by clicking over icon #46

Open
kakoc opened this issue Sep 6, 2023 · 1 comment
Open

Make possible to trigger an action by clicking over icon #46

kakoc opened this issue Sep 6, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kakoc
Copy link

kakoc commented Sep 6, 2023

Currently as I see the only way to trigger some action is to create a menu option. After that open the menu by clicking on the icon and choosing the needed option.
I didn't find a way how to trigger some action just by clicking once over the icon.

@kakoc kakoc changed the title Make possible to trigger an action by clicking left button over icon Make possible to trigger an action by clicking over icon Sep 6, 2023
@olback olback added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 18, 2023
@davehorner
Copy link

davehorner commented Nov 10, 2023

I have committed code that does left click toggle on(green)/off(red) and right click exits.
master...davehorner:tray-item-rs:master

I do not think it is PR ready but I wanted to get some feedback on this approach. The changes break the other platforms so it isn't at all ready (since new interface change). Please look past the registry and enigo code.

The new method I added two new ids to represent the left and right button clicks on the icon. You need to create a menu item for those tray click messages. The menu is never displayed. I would like to not change the new interface and I think it should be independent from the menu. I tried a few things and then went for simple. You cannot add menu items that are hidden so using this approach muddies the context menu.

I'm sure there is a better way to accomplish this. Any thoughts would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants