sonixd
sonixd copied to clipboard
Feature request: tray icon control
I just found SonixD and I think it is awesome! Finally interacting with my Airsonic does not look like using a '90s software. But I am missing one crucial feature - ability to control music from the tray icon (play/pause/next/previous etc.)
By the way, the latest appimage from AUR has a bug - function 'minimise to tray' does not work (in KDE). Only close to tray does.
But I am missing one crucial feature - ability to control music from the tray icon (play/pause/next/previous etc.)
This can be added!
By the way, the latest appimage from AUR has a bug - function 'minimise to tray' does not work (in KDE). Only close to tray does.
Have you tried the AppImage from the releases or does it happen from both? I'll test it out myself soon.

Added playback controls to the tray. Also changed the Minimize to tray and Exit to tray toggles to work without restarting the app. Maybe that will fix it for you on KDE.
When will you release the version with that fix/feature?
When will you release the version with that fix/feature?
Probably in a day or two.
So I just tested on Ubuntu and did a bit of research and found that Electron's minimize API handles differently between Windows/Linux so the minimize to tray doesn't work.
I may look into alternative solutions in the future but for now only "Exit to Tray" will work on Linux.
Good job on adding the tray features! I am impressed with your responsiveness.
But I have a suggestion. Right now, whether you click it with LMB or RMB, the same menu appears. However, from my experience the usual behaviour of programs minimised to tray is that clicking with LMB shows it/hides it back to tray and RMB shows the menu. I think it is much more convenient.
In that case, you could even drop "Open main window" from the menu to make it even more streamlined and quick to use. And in the similar spirit, I think having both Pause and Stop as separate buttons is superfluous and Stop can be dropped as well.
Do you think you could implement this?
Just to add my 0.2c here:
- I'm on KDE and Sonixd 0.13.1, and "Exit to tray" works while "Minimize to tray" doesn't.
- I agree with the proposed left/right click behavior.
- The Stop button should definitely remain in the right click menu, because there is a difference between pausing and continuing playback from where you left off, and stopping and continuing playback from the beginning of the song/queue. But this should also be mirrored in the main app's playback controls (edit: and in the MPRIS controls), where AFAICT a Stop button is not currently present.
- Play/Pause should dynamically change its name depending on playing state. I.e. display Pause when playback is active, and Play when playback is inactive.
- KDE tray issues and tray button entries should probably be split into two different reports for the dev's convenience in tackling them, but that's just, like, my opinion :P
I agree with all, except #3. I think there is something to be said for the goal of simplicity and minimalism in the RMB tray menu. STOP certainly has a different function than Pause, but from the quick-access menu I think the function is similar enough to be basically the same in most cases, hence the STOP could be dropped in the name of the said minimalism. However, this, too, is just, like, my opinion...
I'll keep the stop button since it does have a different function from the pause. Stop should already be implemented in the MPRIS controls but I don't recall if I've tested it thoroughly. I'll also add it to the main player controls, though the reason I hadn't previously is because it would break the symmetry of the controls.
But I have a suggestion. Right now, whether you click it with LMB or RMB, the same menu appears. However, from my experience the usual behaviour of programs minimised to tray is that clicking with LMB shows it/hides it back to tray and RMB shows the menu. I think it is much more convenient.
I need to look at the left click behavior again, since its implementation works for Windows, but weirdly enough doesn't work on Linux (maybe depends on the DE).
Play/Pause should dynamically change its name depending on playing state. I.e. display Pause when playback is active, and Play when playback is inactive.
Will look into this.
KDE tray issues and tray button entries should probably be split into two different reports for the dev's convenience in tackling them, but that's just, like, my opinion :P
Probably would be better, but since it's usually just me tackling tickets here I'll just leave it so the discussion is more localized.
So looking into the tray click events again, I found that it's actually an issue on Electron's side: https://github.com/electron/electron/issues/6773. Don't think it'll be solvable unless someone knows of a different solution to implement a tray that will work cross-platform.