altdesktop / playerctl

🎧 mpris media player command-line controller for vlc, mpv, RhythmBox, web browsers, cmus, mpd, spotify and others.
GNU Lesser General Public License v3.0
2.42k stars 79 forks source link

Feature Request: Switch through players controlled by playerctld #170

Closed AnySomebody1 closed 4 years ago

AnySomebody1 commented 4 years ago

Hi,

it would be really great if it was possible to change the player that is controlled by playerctld via a flag for playerctl or so. Edit: Sorry, I don't know how I can change the label, it definitely is not a bug.

acrisci commented 4 years ago

playerctld selects the last active player. If you want to select a particular player, just select it with playerctl directly.

AnySomebody1 commented 4 years ago

I use playerctl mainly in combination with keyboard shortcuts. As players vary (especially the chromium-mpris players) it would be really hard to set keyboard shortcuts for every individual player. A keyboard shortcut to switch through available players would be much easier.

acrisci commented 4 years ago

Are you aware of player priorities? You can deprioritize chromium with playerctl -p %any,chromium to select any other running player first.

If you still want dynamic player configuration, I'd be open to hearing how it would work in more detail such as the user interface and how the configuration is persisted.

AnySomebody1 commented 4 years ago

Yes, I read about the player priorities feature but it is not what I want because sometimes it is good that I control chromium instead of Spotify with playerctl, sometimes it isn't.

Basically I imagine the UI to be just a additional command for playerctl, for instance playerctl shiftplayer. The basic behavior of controlling the last active player with playerctld would remain the same. But let's say we have the following list of players:

chromium.instance38666 spotify

and then we run the command above so that the list becomes

spotify chromium.instance38666

i.e. like in a circular array where you shift everything by one. I don't think there is any need for persistence here as a new player will be the last active player and thus the player controlled by playerctld by default.

acrisci commented 4 years ago

I would accept this feature but the command should be on playerctld, like this:

playerctld shift

That shifts the player like that by communicating with the running playerctld process.

acrisci commented 4 years ago

173