tray-item-rs icon indicating copy to clipboard operation
tray-item-rs copied to clipboard

Make possible to trigger an action by clicking over icon

Open kakoc opened this issue 2 years ago • 5 comments

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 avatar Sep 06 '23 16:09 kakoc

I have committed code that does left click toggle on(green)/off(red) and right click exits. https://github.com/olback/tray-item-rs/compare/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.

davehorner avatar Nov 10 '23 01:11 davehorner

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.

Make a PR please

arthurbolsoni avatar Jun 04 '24 20:06 arthurbolsoni

its been a minute since I touched this; and I think I felt it wasn't ready at the time and still have concerns with changing the api without fixing all the samples to work... Just make a PR based on this commit alone? there's a bit of extra stuff as I look at it now.

davehorner avatar Jun 05 '24 01:06 davehorner