Moon-0xff / gnome-mpris-label

A music related GNOME extension.
GNU General Public License v3.0
50 stars 9 forks source link

Hide extension when no playing #87

Closed Batwam closed 8 months ago

Batwam commented 8 months ago

Proposed implementation for #57 image

Note that I have made the following design assumptions to be dicussed:

  1. I have kept the code to hide if no player is active but this will only trigger is the "hide extension" option is selected. We can change this easily if we want to continue hiding the extension when no player is open by default.
  2. I have used the same delay mechanism to hide the label and extension. Upon testing it felt weird to see the label disappear right away when I would have expected the label to stay as long as the pause delay isn't reached. Technically we could have different settings but I think that this would be overkill.
  3. the code only checks the active player so, if the active player is paused but another one is playing, the extension will still hide itself. (this will not happen if the user has Auto Switch enabled)
  4. This option is disabled by default
Moon-0xff commented 8 months ago

This one is too aggressive. Might be good for some users?

In any case the code somewhat conflicts with the 'hide when paused' code on label.js. I think we should bring that code outside of label.js, manage everything on the widget side.

Moon-0xff commented 8 months ago

I'll try to make my own solution on the next few days, closing this for the meantime.