Skip navigation

Category Archives: kwik

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.

Aaron Swartz has committed suicide. That news struck me hard. I only know him from his web presence but when something came up on my radar with Aaron’s name tag on it, I expected it to be good if not great. I thought he was a wise old man until I found today that he is of my age. Shocker!

This got me thinking. First, he is orders of magnitudes accomplished than I am. second, he is not there anymore. He broke. I can’t help debating with voices in my head about suicide.

I strongly believe suicide is never the answer. What made me think so? I believe there are two reasons. My father was strongly anti suicide. He even refused to attend the funeral of a suicide victim. Now he is not that extremist about it and I don’t know how wrong he was back then but he obviously had a great influence on me. The other reason is one of many ‘religious facts’ I was exposed to in my young age. I am a Buddhist and they said that suicide is one of the greatest sins. Those ideas have apparently made a significant impact on how I look at life.

Suicide is apparently something that happens too frequently in social circles I take part in. The last one that had me concerned was the death of Ilya Zhitomirskiy who was a co founder of Diaspora social network. His death had an effect similar to what I’m currently going through. I was thinking about sucide. In my soliloquy I realized I’m kind of afraid of suicide [Not death. Mind you.] I won’t ever be able to do that to myself. I will fight the fights, veer through the struggles, drag my emotional self thorugh cold and dark caverns of life but not suicide.

One of those days I felt ‘content’, I read about a long prison sentence. I was imagining that happening to me. Spice that up with a crime I never did. I was scared shitless. I thought a long enough confinement would make my life meaningless that I’d rather die. Would I suicide? I couldn’t make up my mind.

Again I was thinking of a time I lose everything that makes me what I am. Losing these abilities to walk, to talk, to think and code. To dream, to laugh, to sing and smoke (just to make it rhyme. Seriously!). That’s scary to be stuck in the cave that is my body. I’d prefer getting euthinized at this stage. See, it’s not suicide. I’m not doing that to myself.

Whichever route I take in my wanders in my thought space, I never ended up at suicide. It’s not a rational move in my book. But taking all those journeys I realized that to one who does not have a mind hardened enough, suicide may very well look like a good option. Even the best. The one last winning move.

The truth is it is not.

“Treasure your life for all the adventures it may take you through.”

PS: I don’t pretend to be that I can walk in the same boots of those who made the wrong decision. I don’t say my thought expeditions are any close to the real shit one would go through. I don’t say I have it all figured out. I just say that I wouldn’t ever make THAT wrong decision. I would not. Check back when I die.

I was always worried about having to go up in a unix directory tree with cd ../. Then I was introduced to this project at work where I noticed that I was doing so much cd-ing around. Sometimes I went so deep in the directory tree I had this scary feeling inside that I’d get lost in a dark pit (true story).

I wanted a better way to do it. So I did what anyone these days would do. But the best the internet could offer were using pusd/popd, aliasing multiple ../s to ..n and using CDPATH. None of these felt natural enough.

So on one boring evening at work I started to scratch my own itch. I started to do it in python but I ended up in a simpler, much better solution. A function for my bashrc.

I call it za because …

cd to za

cd to za (image: markhillary flickr)

you can use za to jumpback any number of directories up to your $HOME directory. Just put the following function in your .bashrc

za 2 #will jump 2 directories up
za #will jump one directory up

Just see it in action.


za in action

Hope you find it useful.

PS: My blog marked 6 years to yesterday (8th August 2012). I’m out of (a year?) long block with this post :)

Update (07-03-2014): There’s a Fish Shell port of Za now.

You were the father of C which definitely changed the world. You created Unix with Ken Thompson and it was probably the most important piece of technology for practical computing.

some great people are great because they make their greatest contributions to the world and leave silently. You good sir will forever live in hearts of boring nerds like me.

[No picture. Because I don’t remember you from your photo. I remember you as some sort of a super power that rules a green on black world.]

Thank you for C. Thank you for Unix. Thank you for a computing environment that is comfortable for boring nerds.

Rest in peace.

Dear Steve Jobs,
I never used an Apple product. Perhaps never will. But that is not really the point. The point is that you were an inspiration. A big one of those. Yes I respected the other Steve better (Fuck, I even called him ‘the other steve’). But you kept making the world talk about you and that made a good reason to look up to you and learn a trick or two, for life.

Steve Jobs that I remember...

I can assure I never even imagined this day. Like all the other heroes, and people I love I wanted your existence to be etrnal. I wanted you to be there till I die. I knew it was highly unlikely to be the reality for I was too young to be that lucky.

There are times that thoughts of death come in mind. Say, imagining my father’s loss… or mom’s. When that happens I close my eyes and tell myself and the whole universe that it wouldn’t and shouldn’t happen. I did the same when those morbid thoughts regarding you came in my mind. I just don’t want to lose my parents. I didn’t want to lose you either.

I’m sorry for not being able to put down something beautiful and touching like other talented people. But that doesn’t mean I lament your death any less. So what I wanted to say, even though you would never hear is…

Thank you Steve. Thank you for being an inspiration. Thank you for all the lessons. Thank you for being a hero that made my life worth living. Without you, the world feels a little incomplete.

Rest In Peace.