maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [How To] Show currently playing track and album art on your lock screen (https://talk.maemo.org/showthread.php?t=72747)

Obsidian 2011-05-03 12:26

[How To] Show currently playing track and album art on your lock screen
 
2 Attachment(s)
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.

F2thaK 2011-05-03 12:47

Re: [How To] Show currently playing track and album art on your lock screen
 
nice job!,,,,,,,,,

cfh11 2011-05-03 13:39

Re: [How To] Show currently playing track and album art on your lock screen
 
Quote:

Originally Posted by Obsidian (Post 999405)
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.

it's nice to see you giving credit where credit is due... so many people forget this when building FOSS apps. great job, i cant wait to try this out!

Russe89 2011-05-04 09:14

Re: [How To] Show currently playing track and album art on your lock screen
 
Very nice work,
but it doesn't work for me :/
I followed all steps but it won't change my lockscreen.. I changed the font and the background directory correctly.
The folder /etc/dbus.d didn't exist, so i created it via terminal "mkdir dbus.d" and created there the lockscreen file.
Slide to unlock was already removed before, imagemick is also installed.
I really don't know how to fix it.. already rebooted my phone and copied everything again into the folders..

Russe

/Edit: it seems like my dbus-scripts-session does not work..


All times are GMT. The time now is 22:39.

vBulletin® Version 3.8.8