cmus

cmus (C* MUsic Player) is a small, fast and powerful console audio player which supports most major audio formats. Various features include gapless playback, ReplayGain support, MP3 and Ogg streaming, live filtering, instant startup, customizable key-bindings, and vi-style default key-bindings.

Installation

Install the cmus package, or cmus-gitAUR for the development version.

See the optional dependencies for available codecs and output plugins (installed can be listed with cmus --plugins).

Using cmus with ALSA

Install the alsa-lib package.

When using cmus with ALSA the default configuration does not allow playing music. What you might encounter when trying to start cmus is a blank terminal line with no output whatsoever. To fix it, create a new configuration file and set the following variables:

~/.config/cmus/rc
set output_plugin=alsa
set dsp.alsa.device=default
set mixer.alsa.device=default
set mixer.alsa.channel=Master

Usage

See cmus(1), cmus-tutorial(7) and cmus-remote(1).

Configuration

To configure cmus, see cmus(1).

Remote control

Cmus can be controlled externally through a unix-socket with cmus-remote. This makes it easy to control playback through an external application or key-binding.

One such usage of this feature is to control playback in Cmus with the XF86 keyboard events. The following script when run will start Cmus in an xterm terminal if it is not running, otherwise it will will toggle play/pause:

#!/bin/sh

if ! pgrep -x cmus ; then
  xterm -e cmus
else
  cmus-remote -u
fi

Copy the code above into a file and make it executable.

To use cmus-remote in Openbox, see Openbox#rc.xml.

Audio scrobbling

Cmus does not support audio scrobbling itself, but there is third party solutions. Install for Last.fm or Libre.fm scrobbling. For initial configuration run and follow link to perform authentication.

By default cmusfm scrobbles to the Last.fm service. However, it is possible to change this behavior by modifying service-api-url and service-auth-url options in the configuration file (). Afterwards, one should reinitialize cmusfm in order to authenticate with new scrobbling service. In order to use Libre.fm as a scrobbling service, one shall use configuration as follows:

~/.config/cmus/cmusfm.conf
service-api-url = "https://libre.fm/2.0/"
service-auth-url = "https://libre.fm/api/auth"

Next step is to set cmusfm as status program for cmus. Execute command in main cmus window

gollark: I saw that yesterday and SIMILARLY complained that it's not well-defined.
gollark: So if you have an object with the left half in shadow or something, even though a camera sees each side as having *wildly* different colors, you'll just think "oh, that's yellow" or something like that.
gollark: Human color processing isn't measuring something like "what amounts of reddish/greenish/blueish light is falling on this set of cones", it's trying to work out "what object is this and what are the lighting conditions".
gollark: Besides that, you don't perceive colors that way.
gollark: The problem is that what hex code you get out of a picture depends entirely on stuff like lighting and probably camera calibration.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.