Now, left and right click on tray icon in Ubuntu opens drop down menu to toggle messenger or quit.
It will be great if left click toggle window focus by default and right click opens drop down.
Also having "Mute notifications" option there also will be cool.
Could you add information on which version of Ubuntu and flavour you're using?
Ubuntu 18.04 x64 with Community theme on X.org
If you are using Gnome, as I know, tray icons don't have clicked events, so there is no way to add requested feature.
There are Gnome extensions which have clicking events
Can you find out which extensions so I could look into that @vanushwashere?
@sindresorhus i think my issue is related, and don't want to create new one. i also have menu on left click, and or right click. desired behavior is to show/hide window on left click, and menu on right. this is kde plasma 5.13.2
Same thing on KDE 5.51.0 with Plasma 5.14.1
Same here on Debian 9.6 with MATE Desktop 1.6.2 and Caprine 2.22.1, both left and right mouse buttons shows the context menu. For me this started when I updated Caprine from version 2.11.x-something.
Seems like in the electron documentation it says that on Linux click event for app indicator is ignored and according to this issue there's a problem with libappindicator. Only context menu is displayed.
Since Gnome has depricated GTKStatusIcon (which supports click events) and now uses libappindicator with gnome extension, I see no simple way to implement click event other than creating module that will make a tray icon and respond to click events.
For desktop environments other than Gnome, I'm not sure which library is used for creating tray icons and click events.
the problem is with the version of electron used. I've tried to create an electron app using version 2.0.3 and this tray functionality works normally
i've also noticed that there is no problem in Discord and Ramme which both use electron, so this must be a specific issue to the electron version which is used by Caprine
In my opinion this is problem with electron and libappindicator and should be fixed there but we can always ask @sindresorhus. Also I think 2.0.3 is too far behind 3.0.9 (current version of electron used in caprine) to be downgraded.
@dusansimic yes downgrading to that version isn't a solution .. a workaround would be to use kdocker ... which i'm using for spotify currently (because it doesn't have a tray icon), you can clone the caprine repo, comment the tray creation and setup, and use kdocker instead. or leave everything and use kdocker directly, but you would have 2 caprine icons in the tray one created by kdocker and the other by electron
i just built caprine on my machine and this fixed tray issues for me. LMB shows/hides caprine on single click and RMB gets menu (only two entries: toggle and quit). KDE Plasma 5.18.3
It's also fixed for me in KDE
Most helpful comment
@sindresorhus i think my issue is related, and don't want to create new one. i also have menu on left click, and or right click. desired behavior is to show/hide window on left click, and menu on right. this is kde plasma 5.13.2