kirtan-shah / nowplaying-cli

macOS command-line utility for retrieving currently playing media
GNU General Public License v3.0
148 stars 9 forks source link

Add support for playerctl commands #23

Open K9-guardian opened 2 months ago

K9-guardian commented 2 months ago
Currently playerctl supports the following commands. Command Description
play Command the player to play.
pause Command the player to pause
play-pause Command the player to toggle between play/pause.
stop Command the player to stop.
next Command the player to skip to the next track.
previous Command the player to skip to the previous track.
position [OFFSET][+/-] Command the player to go to the position or seek forward or backward OFFSET in seconds.
volume [LEVEL][+/-] Print or set the volume to LEVEL from 0.0 to 1.0.
status Get the play status of the player. Either "Playing", "Paused", or "Stopped".
metadata [KEY...] Print the metadata for the current track. If KEY is passed, print only those values from the metadata.
open [URI] Command for the player to open a given URI. Can be either a file path or a remote URL.
loop [STATUS] Print or set the loop status. Either "None", "Track", or "Playlist".
shuffle [STATUS] Print or set the shuffle status. Either "On", "Off".

It would be great if nowplaying-cli also supported these commands so it could be used as a drop in replacement with existing playerctl scripts.

For some of these commands it might be as simple as making an alias, for others these might not be possible within the MacOS ecosystem though.