When I use playerctl, I want it to always act upon the most recent player or fail. I thought -p would enable this, so I set my hotkeys to use: playerctl -p $(playerctl -l | head -n1). However, for some clients this behavior is simply impossible. Specifically, if there are multiple instances of the same application, and the most recent is the first one opened, it's name as shown in playerctl -l will also match other instances, leading to this bizarre fallback behavior.
If the -p flag didn't match all instances of the name given, then this would be possible, and anyone who wanted the old behavior could do use -p $(playerctl -l | grep '^mpv\..*') instead of -p mpv.
I haven't put it on github yet, but I did make a patch that enables this behavior for my own personal use.
When I use
playerctl, I want it to always act upon the most recent player or fail. I thought-pwould enable this, so I set my hotkeys to use:playerctl -p $(playerctl -l | head -n1). However, for some clients this behavior is simply impossible. Specifically, if there are multiple instances of the same application, and the most recent is the first one opened, it's name as shown inplayerctl -lwill also match other instances, leading to this bizarre fallback behavior.If the
-pflag didn't match all instances of the name given, then this would be possible, and anyone who wanted the old behavior could do use-p $(playerctl -l | grep '^mpv\..*')instead of-p mpv.I haven't put it on github yet, but I did make a patch that enables this behavior for my own personal use.