Want to play music directly from terminal NCMPCPP is your thing.

Ncmpcpp (NCurses Music Player Client Plus Plus) is a sys-libs/ncurses based MPD (Music Player Daemon) client similar to ncmpc, with some new and improved features.

[This setup is based on Luke Smith’s voidrice config but i made some changes to make it work for me]

Prerequistics

Need to have these dependancies first

  • mpd
  • mpc
  • sys-libs

Step 1 : Install

sudo pacman -S ncmpcpp

Step 2 : Configure

  • create config files: nvim ~/.config/ncmpcpp/config

  • paste the content from here:

ncmpcpp_directory =         "~/.ncmpcpp"
mpd_host =                  "localhost"
mpd_port =                  "6600"
mpd_music_dir =	            "/var/lib/mpd/music/"
  • Go to ~/.config/mpd folder
    • create/edit config file
    • paste the content from here:
music_directory      "/var/lib/mpd/music"
playlist_directory   "/var/lib/mpd/playlists"
db_file              "/var/lib/mpd/database"
log_file             "/var/lib/mpd/log"
state_file           "/var/lib/mpd/state"

user                 "mpd"

bind_to_address      "localhost"
bind_to_address      "/var/lib/mpd/socket"

input {
        plugin "curl"
}

audio_output {
        type            "alsa"
        name            "default"
        mixer_type      "software"
}

Edit them according to your need like changing music directory and all.

  • Inside config/mpd folder create these files and folder too
    • mkdir playlists
    • touch mpd.conf mpd.db mpd.log mpd.pid mpdstate

Step 3 : Initialize mpd and start ncmpcpp

  • kill mpd process killall mpd

  • start mpd mpd &

  • start ncmpcpp ncmpcpp

Enjoy!