Skip navigation

Tag Archives: MoC stjerm ubuntu music cli

The music lover in me was heart broken with the famous Amarok screw up waaay back then. I then used Cmus for a short period and then came across MoC (Music on Console) on crunchbang forums IIRC. MoC was my primary music player ever since. In MoC I would just browse to my music directory and play a song. MoC will keep playing all the music there. This was just the behavior I needed. Yes it supports play-lists but I never looked in to it.

There was a time I was obsessed with simple lightweight command line apps. In my search I found stjerm and I fell in love with it. I use it to date but only for one thing, as a home to MoC. MoC and stjerm are a nifty combo I must say.

One of those boring evening at works I realized I need to bind my multimedia keys to work with MoC. This completed the ‘The thinnest music interface’ for me.

I am using Ubuntu so I am going to show you how to get the TMI setup on Ubuntu.

First you need to install MoC and stjerm.

sudo apt-get install moc stjerm

You can run MoC with the command mocp and quit it with Q. h for help. Check my dotfiles for my moc configuration.

Then you can customize how stjerm looks and assign a keyboard shortcut to it. Oh and have it load on startup.

Following command will run stjerm with f12 function key bound to it and with mentioned opacity and font colors.
stjerm -k f12 -o 60 -fg 66ff11

Adding following line to your startup applications would run this at the startup, automatically.
/usr/bin/stjerm -k f12 -o 60 -fg 66ff11


Adding stjerm to startup programs

Then comes binding keys. You can add custom keyboard short cuts (System Settings > Keyboard > shortcuts) and bind key combinations to following commands.
mocp -f
mocp -r
mocp -G
mocp -s

Those are for previous, next, play and stop in that order.


Add keyboard shortcuts for mocp

I really like this setup for my music.