Open Freeplayg opened 1 month ago
It's possible, but it requires quite a lot of hacking.
It would require a way of communicating the selected source to an outside script of your own.
I've been thinking of exposing the selected player source for this kind of use, but there's no good and simple approach to this.
If you want to make this work as a hack, you could add a line that exposes this.player.identity
or this.player.address
, probably in this if statement on _refresh
:
if(this.player != prevPlayer)
this._getStream();
My idea would be to log it:
if(this.player != prevPlayer) {
this._getStream();
log("MprisLabel:SOURCE = " + this.player.identity);
}
Then capture the log in a bash script with grep
, but that's personal preference, you can use python or any scripting language for this.
For sure this is not a great solution, you'll have to patch
the code every time the extension updates, you'll log useless data, and you'll have to develop the script.
If that doesn't deter you then go right ahead! I think the only additional information you need is the name and options of the keybinding settings, which you can change with the gsettings
command.
I'm not sure if it is possible? But it would be really nice if changing the source from here could also change what the media keybinds control
![image](https://github.com/Moon-0xff/gnome-mpris-label/assets/40742947/92a24553-9d48-4d1c-88c0-97ea09142c01)