Posts Tagged ‘Amarok’

XFCE Desktop

Saturday, October 18th, 2008

To cut a long story short, I’ve switched from KDE to XFCE, which is univer­sally acknowl­edged as a ‘light­weight’ and easily customiz­able desktop environ­ment. When I earlier switched to KDE 4.1, there were several bugs that were a constant source of irrita­tion. Add to that the fact that appli­ca­tions like Amarok (which were the reason why I loved KDE) did not have the same level of features as their 3.5 version avatars, and I realized there was nothing that I really needed from KDE 4.1 anymore. I could have switched back to 3.5 of course, but I gener­ally don’t like to rollback to an earlier version after having tasted the newer one. That’s how I ended up with XFCE.

XFCE has a nice clean look, and it is much faster too. Person­ally, I would happily sacri­fice desktop effects for perfor­mace, so this switch worked out pretty well for me. Of course, there was ‘The Terminal UTF-8 Problem’ which I will describe in detail in another post.…

Scripting Magic

Sunday, October 5th, 2008

It’s amazing how much can be achieved with the help of a few scripts. If you come to think of it, scripts are the original mashups that Web 2.0 has vener­ated in recent times.

Today, I decided that I would have a “Now Listening” box shown on my blog — I’m not sure if it is visible at this moment — which would display the name of the artist of the currently playing track on my computer. So here’s what I came up with -

  1. A Bash script that would use DCOP to query Amarok, deter­mine the currently playing song, and update a tempo­rary file accordingly.
  2. A small PHP script that would read the file and display this infor­ma­tion, but only if it is available.
  3. A set of CSS rules to format the gener­ated XHTML.
  4. A cron job to execute the script every minute.

Voila! It’s done…almost like magic.