JasonLG1979 / gnome-shell-extension-mpris-indicator-button

A full featured MPRIS indicator button extension for GNOME Shell 3.38+
https://extensions.gnome.org/extension/1379/mpris-indicator-button/
GNU General Public License v3.0
159 stars 21 forks source link

Gnome 41 Support? #62

Closed Scotty-Trees closed 2 years ago

Scotty-Trees commented 3 years ago

Greetings,

Gnome 41 was released this month and I was wondering if/when the extension will be updated? Thank you for your time and thank you for making an amazing extension I couldn't live without! Cheers

JasonLG1979 commented 2 years ago

41 was just released on the 22nd (3 days ago as of this writing). It will get support for 41 shortly before Fedora 35 is released.

Scotty-Trees commented 2 years ago

No worries, appreciate the reply! I use your extension every day, so it will be great to keep on using it :+1:

JasonLG1979 commented 2 years ago

It's all good. If all goes well you're looking at maybe a couple weeks.

Scotty-Trees commented 2 years ago

Yeah no worries, being on Gnome for the last couple years I totally understand it's all volunteer work on your end and all on your own time after job/personal life/relationships/etc, which I greatly appreciate, so I know it usually takes 1-3 months after a new Gnome release for extensions to be updated. I just wanted to query this question since I didn't want to see this lovely extension join the graveyard so to speak ;)

JasonLG1979 commented 2 years ago

I know it usually takes 1-3 months after a new Gnome release for extensions to be updated

1- 3 months? That's crazy talk. I'm usually pretty on time. Feature wise the extension is basically complete as far as I'm concerned and these last few releases haven't really broke much so basically it just comes down to having something reasonably stable that I can spin up in a VM and test against.

JasonLG1979 commented 2 years ago

Most of the times it's just "Ok yep it works" version bump done.

Scotty-Trees commented 2 years ago

1- 3 months? That's crazy talk. I'm usually pretty on time.

Oh I wasn't meaning to imply you'd take up to ~3 months to update, I just meant in my experience with the various extensions I've used over the years I've had some of them take about that long to update to the current Gnome release sometimes, and usually always see one or two extensions that don't get updated at all, but thankfully manage to still "just work" without me having to edit some .json file somewhere of course, though I have had to do that once or twice.

I actually did have one question (I can create a proper issue with more info/screenshots/logs if you prefer), but since your extension is pretty much complete I understand if it's a wontfix type of issue. When I have for example say, a (1)Music player and (2)Gnome Podcast, and (3)Vivaldi in that order, in the extension, with the Music player being at the top, when I lock my desktop and then unlock it, Vivaldi (Firefox will do it too), will take over the top spot of the extension where the Music player spot used to it. I don't know if it's possible to make your extension remember the last known like setlist after locking/unlocking. It would be nice to have continuity with the extension in that regard. I think when locking and then unlocking, Gnome probably reloads, so the extension reloads too I'd imagine, but I don't know if it'd be possible to have a remember last used list or something like that. If it's something you think could be looked into let me know, if it's a no that's okay with me too, it's not a dealbreaker, but just something I thought I'd mention.

JasonLG1979 commented 2 years ago

You guessed right, GNOME Shell reloads extensions in that instance. As far as the extension is concerned it's as if you've enabled it with preexisting players present. The order in which those players are exposed via dbus is basically random so I sort them alphabetically so at least it's kinda consistent. The order could theoretically be saved in a non user exposed gsetting but it's hacky as Hell and not reliable. I've played with the idea in the past but never come up with anything that I was happy with.

Scotty-Trees commented 2 years ago

Yeah I imagine it's not something that would require an easy and simple solution, but good to know you thought about it well before I did haha. Like I mentioned it's not a deal breaker at all, just mostly something I was curious about. My simple fix is just to close Vivaldi before I lock my system if I'm able to, otherwise I'll just leave it open. Perhaps maybe a music player could take priority over others but I'm not sure if that's even a thing and there is so many music players out there who knows where to begin! In any case, thanks for explaining it out to me, I greatly appreciate that.

JasonLG1979 commented 2 years ago

Perhaps maybe a music player could take priority over others but I'm not sure if that's even a thing and there is so many music players out there who knows where to begin! In any case, thanks for explaining it out to me, I greatly appreciate that.

Basically a player is a player. Without some kind of white/blacklist there's no way to tell a web browser from a music player from a video player. As far as the extension is concerned it's just a dbus interface.

Scotty-Trees commented 2 years ago

Hmm could you simply white/blacklist a handful of web browsers then perhaps? Sorry I'm not as knowledge as this as you are.

JasonLG1979 commented 2 years ago

You can disable MPRIS in Chrome(ium) Vivaldi being based on Chrome(ium) I'd imagine you maybe could also if that's what you're after?

Scotty-Trees commented 2 years ago

Ok, I did some quick Googling and found at least for Vivaldi, if I go to vivaldi://flags and search for "Hardware Media Key Handling" I can set that to disable and a quick restart and now Vivaldi media no longer shows up on your extension. I'd consider this a win since I never really used the extension with my web browsers because they are always open, I typically use it to see what track I'm playing in my music player, or podcast, or the rare odd chance I'm using Celluloid or MPV. I'd say that's a decent fix that'll do the job! Any time I need to play/pause stuff in Vivaldi, I'm 99.9% of the time already in Vivaldi, so I doubt I'll miss not seeing it show up in the extension. Thanks for the this little great tip, I appreciate all your help very much! And good luck with the Gnome 41 support!

JasonLG1979 commented 2 years ago

Ok, I did some quick Googling and found at least for Vivaldi, if I go to vivaldi://flags and search for "Hardware Media Key Handling" I can set that to disable and a quick restart and now Vivaldi media no longer shows up on your extension.

Same thing in Chrome(ium).

I'd consider this a win since I never really used the extension with my web browsers because they are always open

Same. Not to mention that GNOME Shell uses MPRIS for mediakeys but since there's no way in MPRIS to tell if a "Player" is focused the last player to show up just permanently steals the mediakeys.

Scotty-Trees commented 2 years ago

Same. Not to mention that GNOME Shell uses MPRIS for mediakeys but since there's no way in MPRIS to tell if a "Player" is focused the last player to show up just permanently steals the mediakeys.

Yeah I think I used my keyboards media keys a few times years ago, but when it would pause things and not pause other things, I honestly just stopped using those keys. Your extension more or less fits in as like a replacement for that I guess you could say. So you're doing good work that's for sure :)

JasonLG1979 commented 2 years ago

Your extension more or less fits in as like a replacement for that I guess you could say.

It also supports mouse actions and keyboard shortcuts, granted you have to mouse over the extension.

The general idea being that you can control the "active" player without actually opening the menu.

Scotty-Trees commented 2 years ago

It also supports mouse actions and keyboard shortcuts, granted you have to mouse over the extension.

Oh wow I wasn't even using that feature at all, thanks for the reminder that that exists ;)

JasonLG1979 commented 2 years ago

@Scotty-Trees Well that adds support for 41. I'll upload the update to https://extensions.gnome.org/ shortly. Everything seemed to work in a quick test in a Fedora 35 beta VM.

Scotty-Trees commented 2 years ago

Nice going well done! Glad to hear it all worked out rather easily. Still no Gnome 41 in the Arch repos yet but I'm not in a hurry to get it to find out which extensions it did break, but I'm happy your extension has th support. Glad I could help hehe jk. But in any case thanks again for this extension I can't tell you how often I use it daily, but it's a lot! Keep up the good work!

JasonLG1979 commented 2 years ago

I think that 40 to 41 will be less painful than 38 to 40 especially for extensions that alter the appearance of the Shell like docks and whatnot.

Scotty-Trees commented 2 years ago

Yeah I would agree with you that it should be less painful indeed. Time will tell soon enough! But either way I'm looking forward to the improvements overall of Gnome 41 :)

JasonLG1979 commented 2 years ago

I haven't decided if I'm going to go for Fedora 35 or Ubuntu 21.10? I bounce back and forth between Fedora and Ubuntu generally, depending on what runs best on my hardware and lib versions. If I go for Ubuntu I'll be stuck on 40, but generally Ubuntu is less crash-y for me and is easier for my wife to play her games on.

Scotty-Trees commented 2 years ago

Have you considered PopOS? It's Gnome based as well (tho they do have documentation available to install other DE's). It's kind of a middle ground between the two. You get the Debian/Ubuntu base and security fixes, and it's a bit like Fedora in that generally PopOS will push updates like the latest kernel, nvidia drivers, etc while Ubuntu stays a bit more static in their updates. PopOS is also nice, because unlike Fedora's "only include libre software packages" generally speaking PopOS works right out of the box for graphic cards, for bluetooth, codecs, etc. Your hardware probably differs greatly from mine (Acer Aspire E5-576G from like 2017), but for me PopOS works without having to do hardly any post-install stuff other than installing my preferred programs. Fedora typically is a nightmare for me until I fix the nvidia issues, fix the bluetooth issues, and a few other things that are all managable, but they do become a hassle, so while I do like Fedora I don't use it anymore. I'd recommend PopOS, plenty of community support via Reddit and their official Discord server as well. It's very friendly and easy going and it doesn't use any snaps by default unlike Ubuntu, PopOS embraces flatpaks instead. If you have any more questions about that feel free to ask, I've used all those distros before as well.

JasonLG1979 commented 2 years ago

I've tried PopOS. Can't say I care for their "Cosmic" GNOME Shell tweaks. Basically I'd just end up stripping it down to vanilla GNOME.

I've had pretty good luck with Fedora. Maybe just slightly more trouble than Ubuntu on average I'd say. My computer isn't really anything special It's just an ASRock X300 barebones with a Ryzen 3 3200G. I built it for under $500. I'm not a free software purist or anything but I built it specifically because it doesn't require any proprietary drivers just because it's easier.

With everything being available via flatpak non-free libs aren't really an issue. Basically the only thing I have to install is DVD and Blu-Ray support and RPM-fusion has all that.

Scotty-Trees commented 2 years ago

Yeah I disable cosmic as well, its just turning off the cosmic extension and your back to normal gnome with a few popos tweaks but if Fedora works best for you i'd give that a try and if its a bit buggy you always have Ubuntu to fall back to in the meantime. As foe myself I'm very happy on a rolling release distro like EndeavourOS. Sounds like your Fedora setup is a lot easier than mine that's for sure, ha!

JasonLG1979 commented 2 years ago

I can't go rolling. My wife would kill me,lol!!!

Scotty-Trees commented 2 years ago

I cant have you die on me, then I'd have to learn how to code and fork your extension in honor of your memory :P

JasonLG1979 commented 2 years ago

I should really learn to code one of these days,lol!!!

Scotty-Trees commented 2 years ago

Must've been the quickest update I've ever seen, but I got a notification via the extensions app last night saying that your new version was up on Gnome Extension. Usually it takes a couple days or longer!

JasonLG1979 commented 2 years ago

Besides the version bump there was only one line of code changed. So there wasn't much to review and I think they might have automated some of the review process?

Scotty-Trees commented 2 years ago

Yeah a version bump and one line of code change was probably the easiest review too, maybe that's why it was so quick, either way it was surprising since I'd used to extension devs saying they updated it and then wait for the process which I've never seen handled that quick before, but it's a welcome change for sure.