View Single Post
Posts: 10 | Thanked: 29 times | Joined on Jun 2010 @ Germany
#1
This is my first "real" posting and English isn't my mother tongue, but having taken so much from this community in the last year I want to contribute something, too. I searched for something like this, but I couldn't find anything similar. If someone did this before or better, or if I forgot to credit someone I'll happily edit my post.

Using the N900 as my portable audio player, I often had to unlock it, to see what's playing right now.

Taking inspiration from Alfred's thread and converting generationally's script to bash, I fumbled together a script that takes the metadata and makes a new lockslider.png. It relies heavily on GreatGonzo's mafw-trackinfo and Graham Cobb's dbus-scripts. The part that checks if the media player is running is by qwerty12, the symlink to the current theme directory comes from MohammadAG.

1) Install imagemagick ->
2) Install dbus-scripts and have it run on the session bus
3) Install mafw-trackinfo
4) Remove "slide to unlock" ->
5) Place attached lockscreen.sh in /usr/bin (you'll probably have to be root)
6) Create file lockscreen in /etc/dbus.d with the following content
Code:
/usr/bin/lockscreen.sh * * com.nokia.mafw.renderer metadata_changed title
7) The things you'll need to change in the script:
  • The font I use is a Japanese one as I often listen to Japanese music, change it to one of your liking:
    font="/home/user/.fonts/ARISAKA.ttf"
  • The unmodified lockslider.png is here:
    background="/home/user/MyDocs/.documents/Sonstiges/lockslider.png"
8) The things you'll likely change: size and position of text and artwork, maybe a portrait mode as well. You could make the LockSliderThumb.png in /etc/hildon/theme/images/ a little more transparent (I used gimp to do it) to allow for a better artwork experience.
Attached Images
 
Attached Files
File Type: txt lockscreen.sh.txt (1.6 KB, 139 views)

Last edited by Obsidian; 2011-05-10 at 07:26. Reason: New version of lockscreen.sh features better handling of metadata that contains quotes(")
 

The Following 22 Users Say Thank You to Obsidian For This Useful Post: