mympc/README.md
2025-05-29 18:51:00 +02:00

3.0 KiB

mympc

Wrapper around the mpc command line client for controlling a Music Player Daemon server.

It does zsh completion for the mpc command and provides a few functions to make it easier to use mpc.

Installation.

copy the files in the same path as they are in the repo. Add the following to your .zshrc file:

autoload -Uz compinit
compinit
Usage: /usr/local/bin/mympc [options] [arguments]

Options:
  --artist [name]                Search for songs by artist (comma-separated)
  --genre [name]                 Search for songs by genre
  --album [name]                 Search for songs by album
  --track [name]                 Search for songs by track name (comma-separated)
  --year [year]                  Search for songs by release year (e.g., --year=1990)
  --duration [min:sec]           Search for songs by duration (e.g., --duration=3:30)
  -n, --number [number]          Specify the number of songs to add to the playlist (default: 15)
  --play                         Play directly after adding songs to the playlist
  --preview                      Preview the songs that will be added to the playlist without adding them
  --save-playlist [name]         Save the current playlist with the given name
  --remove [track1,track2,...]   Remove one or more songs from the playlist, separated by commas
  --list-artists                 List all available artists
  --list-genres                  List all available genres
  --list-albums                  List all available albums 
  --random                       Activate random mode
  --repeat                       Activate repeat mode
  --get-rating                   Get the rating of the current song
  --rate [0-5]                   Set the rating of the current song (0-5)
  --toprated                     Generate a playlist of top-rated songs (rating=5)
  --add-tag [key=value]          Add a custom tag to the current song
  --delete-tag [key]             Delete a custom tag from the current song
  --list-tags                    List all tags of the current song
  --update-tag [key=value]       Update a custom tag of the current song
  --playlist-by-mood [mood]      Generate a playlist based on the specified mood
  --playlist-by-mood=[mood]      Same as above, using '=' syntax
  --help, -h                     Show this help message

Examples:
  /usr/local/bin/mympc --artist="Pink Floyd,AC/DC" --play -n 10
  /usr/local/bin/mympc --album="The Dark Side of the Moon" --play
  /usr/local/bin/mympc --genre="Blues" --year=1980 --play -n 5
  /usr/local/bin/mympc --track="Comfortably Numb,Money" --play
  /usr/local/bin/mympc --artist="Pink Floyd" --track="Money,Time" --play
  /usr/local/bin/mympc --get-rating
  /usr/local/bin/mympc --rate 4
  /usr/local/bin/mympc --toprated --play
  /usr/local/bin/mympc --add-tag "mood=happy"
  /usr/local/bin/mympc --delete-tag "mood"
  /usr/local/bin/mympc --list-tags
  /usr/local/bin/mympc --update-tag "mood=energetic"
  /usr/local/bin/mympc --playlist-by-mood=happy --play