request: systray icon

Bug #1589798 reported by RAWRR
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Wishlist
Unassigned

Bug Description

A systray icon with the following as options:

- systray only (hiding from the window list)
- single click minimize/restore

Because sometimes I'd just like to use Mixxx as a music player, and I don't need it crowding my window list for hours as it plays.

As a peripheral benefit, this kind of use incentivizes long play testing. I remember a couple of versions ago I used to have memory buildups that resulted in crashes after several (3+) hours of play that would only manifest in live sets. I never used Mixxx for hours at a time at home, and never saw memory could get to dangerous levels until it was too late.

But really this would just be cool ;)

Tags: gui
Revision history for this message
RAWRR (rawrr) wrote :

I'd be happy to work on this myself if someone would help me. I'd expect of course to wait until GSoC is over since I know everyone is very tied up atm.

Or someone else can do it, I'm not particular.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

It this request for a particular OS?

Revision history for this message
RAWRR (rawrr) wrote :

I'd like the feature to be available to everyone. Isn't QT cross platform?

I'm in Linux atm and would want the feature there first, but I can work in Windows later. Mac might be a bit more of a hurdle.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Qt provides a cross platform class:
http://doc.qt.io/qt-5/qsystemtrayicon.html

But I am afraid this is somehow windows driven and using this will make Mixxx feel foreign running under GTK based Linux desktops.

Ubuntu Unity for example has a whitelist for systray icons, which avoids displaying cross platform systray icons

The Linux solution for your issue is implementing the MPRIS dbus interface.
This allows to use Mixxx in the same way you use Rhythmbox or Clementine form the systray (Sound Applet)

I have an unfinished branch to do that https://github.com/daschuer/mixxx/tree/mpris

How it the situation on Mac?

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Sébastien BLAISOT (sblaisot) wrote :

I don't like the idea to ask to application developper to include a function that window manager/desktop manager should deal with.

Hiding an app from taskbar is clearly a desktop manager feature.

my 2 cts.

Revision history for this message
RAWRR (rawrr) wrote :

@sblaisot

> clearly a desktop manager feature

I don't think it is clear; many players and applications have implemented a feature like this. I don't think it is reasonable to suggest a user change their desktop environment (especially in the case of Windows users) just for a simple thing like this.

@dascheur

I had in mind the function that Audacious has, but not necessarily the metadata/player aspects. Audacious seems to use GTK to achieve this:

http://redmine.audacious-media-player.org/projects/audacious/repository/audacious-plugins/revisions/3ec8f6781c5682d22f42d3415f123bef98fd0ee9

And works even when I have the MPRIS 2 server plugin disabled (maybe not the same thing as the dbus interface?)

Revision history for this message
RAWRR (rawrr) wrote :

I really had in mind for this to be as simple as possible, rather than being a miniplayer in the statusbar/system tray or something like that. At most, having info on the currently playing track available.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Here is the code:
https://github.com/audacious-media-player/audacious/blob/3ec8f6781c5682d22f42d3415f123bef98fd0ee9/src/statusicon/gtktrayicon-x11.c

Unfortunately I cannot find the code in the recent audacious version.
On my system Ubuntu + Cinnamon there is no systray icon for audacious and no option to enable it.
VLC player has an option in preferences: "Show systray icon", but it does not work.

However, in any case MPRIS2 a D-Bus based protocol is the preferred way way on Linux.

It looks like for your simple demand we need only to implement the MPRIS2 Raise() command.
https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Method:Raise

https://github.com/daschuer/mixxx/blob/mpris/src/mpris/mediaplayer2.h#L44

The "only" issue is that we need to put Mixxx on the white list for the various sound applets like here:
https://github.com/nbourdau/pkg-cinnamon/blob/ac7b0c50025461a9e43e6781f83355f832ad4091/files/usr/share/cinnamon/applets/sound%40cinnamon.org/applet.js#L102

Will this work for you?

#####

For windows, it looks like a solution based on http://doc.qt.io/qt-5/qsystemtrayicon.html
will work.

#####

Mac OS?

Revision history for this message
RAWRR (rawrr) wrote :

Thanks very much for your research!

It's a shame Cinnamon discriminates; in Lubuntu (LXDE) the Status Icon Plugin is present and works fine immediately. Audacious-plugins is probably required, see: http://packages.ubuntu.com/trusty/i386/audacious-plugins/filelist

Regarding MPRIS/Dbus, isn't that only necessary if you need access to a media player's controls? What about simply https://standards.freedesktop.org/systemtray-spec/systemtray-spec-0.3.html ?

I guess it might be prudent though, to adopt a method that would be easier to add features to in the future, which would be MPRIS.

I went hunting for Mac solutions, but the default dock there doesn't seem like it would benefit from this. However, I'm not working from experience, I've almost never used Mac.

Revision history for this message
RAWRR (rawrr) wrote :
Revision history for this message
RAWRR (rawrr) wrote :

@sblaisot

I see now that you weren't necessarily talking about this entire feature request, simply the part about hiding the app from the window list. This became apparent after reviewing other apps with similar functionality in Linux - who all can minimize to tray exclusively, but when raised typically appear in the window list. Perhaps the sentiment you expressed is why? In any case, I wouldn't have a problem with compromising, though I'd still prefer the option to hide it from the window list.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Here is the finally the audacious source:

https://github.com/audacious-media-player/audacious-plugins/blob/23c9dfb7df6e52b1df61069ad0c894fda3b456fb/src/statusicon-qt/statusicon.cc

It looks like we need such a solution for Windows anyway and IMHO there is no issue to use it on Linux Desktop that allows it (following the windows principals)

@RAWRR: On which Desktop / Distro are you?

Revision history for this message
Be (be.ing) wrote :

This would be especially nice to have when the PulseAudio backend for PortAudio is complete.

Revision history for this message
RAWRR (rawrr) wrote :

Atm I'm using LXDE and Debian, but honestly in Linux I switch around a lot; I'm a bit promiscuous when it comes to distros and DE's. GNOME, Fedora, SUSE, MATE, Mandriva, LXQT, XFCE, Ubuntu, these all are just - whatever. I really have no problem testing this in a variety of Linux environments.

It would be a slightly bigger hassle to test in Windows atm, but I can.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Cool, do you have an overview on which Desktop a MPRIS2 solution is sufficient and which required the independent systary icon?

Revision history for this message
RAWRR (rawrr) wrote :

It will take me a few days to check and report back.

In the meantime, my bet is that most will not require MPRIS2, simply because I've sought out Audacious in almost every DE and distro I've used, and made sure to configure its systray plugin each time, never having a problem.

But I will check just to be sure.

tags: removed: desktop integration os ui ux
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8567

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.