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 Responses to “Bonus points for cmus-remote”


  1. 1 Jonathan D. Page 2011/04/11 at 5:17 AM

    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.

    • 2 ErSandro 2011/04/11 at 5:39 PM

      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.

  2. 3 ancientforest 2011/04/12 at 2:38 AM

    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.

  3. 4 Ben Winston 2011/04/14 at 7:48 AM

    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.

  4. 5 Dennis 2011/04/18 at 12:20 PM

    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


  1. 1 A built-in diary « Motho ke motho ka botho Trackback on 2011/04/12 at 10:38 AM

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




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 404 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,963,988 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 404 other followers

%d bloggers like this: