Bonus points for cmus-remote

I am a lukewarm cmus fan. Just like I am a lukewarm vim fan. Both programs, if I must be honest, are adequate, but somewhat eccentric.

I overlook those eccentricities because they get the job done, and in some cases because they add a few noteworthy fillips.

For example, cmus is one of the few players I have found that is light enough to run at less than 150Mhz. That alone is why I use it on most of my machines.

But cmus in Arch also comes bundled with cmus-remote — which in lieu of running cmus in a session of screen and joining that session as a second user, allows me to control the player via the command line.

To wit: cmus-remote -u pauses the player, and restarts it after I answer the phone.

Or even better, just cmus-remote followed by

player-pause
player-next
status
vol 20

Any of those commands, typed directly into stdin, is piped into the active cmus session, and controls the player remotely.

Tack that on to an ssh session and you don’t need a multiplexer to reach across the room and turn down the volume.

It’s true that a proper, full-featured screen session across ssh would give me direct control and a few more features, but in a pinch, this’ll do.

About these ads

6 thoughts on “Bonus points for cmus-remote

  1. Jonathan D. Page

    I may have asked this before, but have you looked at MPD? It is pretty lightweight, and is actually designed to be interfaced with over the network. It binds to a port and can be controlled from there using a program like mpc, ncmpc, ncmpcpp, or even telnet.

    Reply
    1. ErSandro

      I don’t know why but i aleays found mpd heavier than moc and cmus, but i really like the way it manages music library with ncmpcpp.

      All in all these are three great pieces of software and is possible to control remotely all of them.

      Reply
  2. ancientforest

    I’ve been a huge cmus fan since your first mention of it here… I don’t really need a remote-controllable / daemon-based player, and cmus is so wonderfully quick and efficient with pretty much any format, even AAC and streaming radio. Still my favorite player.

    Reply
  3. Pingback: A built-in diary « Motho ke motho ka botho

  4. Ben Winston

    thank you so much for this post! i literally have on my todo list “figure out if cmus works with sockets”. i guess i can cross it off now :)

    cmus-remote has proven incredibly useful already, as i run a command-line install of arch on a netbook, and spend a large part of my time in vim. with my recent revelation of the :sh command (how did i not know this earlier?!), combined with cmus-remote aliases, it’s simple to control my music running in a detached screen session from (nearly) within vim.

    Reply
  5. Dennis

    Here’s a script I wrote to toggle the pause/play on cmus and start cmus and begin playing if cmus isn’t running. I have it mapped to a global hotkey so that I have instant access to my music anywhere. Oh and replace gnome-terminal with your favorite terminal (xterm):


    #!/bin/sh
    # Tests if cmus is running and starts it if it isn't.
    # Then it toggles play/pause.
    # Oh and this command will break if you rename it to
    # something containing "cmus".

    if ! ps ax | grep -v grep | grep cmus > /dev/null
    then
    gnome-terminal -e cmus
    fi
    sleep .05
    cmus-remote -u

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s