AmarokScreenSaver

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

2
5.0
Description:

AmarokScreenSaver

Displays information about the currently playing song as a screensaver

I often use my computer to play music when I am having visitors or when I am just not in front of the monitor. I wanted some way to still be able to see what song was playing. As my TV is connected to the computer I decided to make a screensaver that would do just this. (you don't need to even own a TV to use this script, but my TV is in my living room and my computer is not...)

This script creates an image based on the currently playing song in Amarok, then changes your screensaver to KSlideshow and tells it to display this particular image. It restores your original screensaver settings when you stop the script or exit Amarok.

The script has some basic settings configurable via a dialog:

Party / safe - mode:
The script can be configured to lock the screensaver, you will need your password to return to the desktop. This is great if you are having a party and don't want everybody to use the computer for surfing or changing track every other minute.

DPMS:
I use display power management to turn off my monitor after a given period of time. This did not work well with my idea. Therefore I created an option to turn off DPMS, and turning it back on when the script is exited or Amarok is shut down.

Rotate image placement:
To prevent damage to the screen the images can be placed at random position, or fixed.

Screen width:
Enter the width of your screen in pixels

Screen height:
Enter the height of your screen in pixels

Cover factor:
Size of the cover relative to the size of your screen (in percent).

Requirements:
- Amarok (duh...)
- KDE, not sure if it will work with anything else, at least KScreensaver and KSlideshow is needed
- ImageMagick
- PyQt (Only to configure the script, this can also be done manually by editing a textfile)
Last changelog:

12 years ago

Version 0.5.0:
- Works with KDE4 (>= 4.0.5)
- Does not start the screensaver if computer is in use (KDE4 only)

Version 0.4.1:
- Restores your original screensaver settings when you stop or pause playback (as well as when you exit Amarok).

Version 0.4.0:
- More config options
- Added reflection
- xwininfo and bc no longer needed
- Settings not lost when you reconfigure
- Tracknumber not shown when there is none

Version 0.3.1:
- Fixed bug where screensaver did not find any images after being active for a while

Version 0.3:
- Takes care of Kopete status. No longer changes status on each trackchange.
- The screensaver stays active on trackchange. Amarok is no longer shown
- Changed the name from KoverSS to AmarokScreenSaver

Version 0.2.1:
- Regression fix, images have better quality again!

Version 0.2:
- Better configuredialog
- More screen-friendly. Creates more than one image with the text and cover art in different places.
- Various fixes and speed improvements

Version 0.1.2:
- Works even if user has no screensaver set (Thanks to David Hugas Germí )

Version 0.1.1:
- Cover image now has better quality

Version 0.1:
Here we go!

C

nebbus

13 years ago

Yes, you are right. The name does resemble the Nazi organisation SS. I knew about this when I made the script and I thought about an other name, but I did not find one I liked. KoverSaver was taken and KoverScreenSaver was too long. AmarokSaver is the best alternative.

I chose to stay with the name for a number of reasons. There are a lot of technologies already that have SS in their name (ssh, css, ssl comes to mind), and even tough the Nazis did a lot of horrible things I still think the world has to go on. We should not forget what they did, but neither should we be afraid for using 'SS' in names or any other objects that might resemble any Nazi organisation.

Any way; I will change the name if I five or more persons make a post that they will not use the script because of the name. Please post also if you do not want me to change it! AmarokSaver is one alternative, but pleas give me ideas if you can think of anything else.

Report

gecko

14 years ago

I like your Skript.
But I've had a problem because my kopete generates everytime the Song changes an away and a back message. So I just made the lines 268 and 269 to a comment. So there is also no Desktop visable between the songs, while the screensaver is runing.

Tankyou

Report

C

nebbus

13 years ago

Hi, sorry for my late answer, I have been quite busy at work...

I hadn't thought about the kopete problem. It is easily fixed either your way or with some more dcop-magic! I wil take care of that in an upcoming release!

About the two lines you commented out:
This will fix the kopete problem, but it will also prevent the screensaver from starting on a track-change. The screensaver will start after the time you have sett in you preferences. This will also make the "lock screensaver" function of the script not work. But if you like it more this way that is just fine!

But all of this got me thinking quite a bit! And I have some new ideas for the next release, taking care of these problems. It should not be difficult!

Anyway: Glad you like the script, and glad you could make it work the way you want! Thanks for the feedback, this will make the script better and better!

nebbus

Report

gecko

13 years ago

I don't know if my way realy fixed this problem. I think there was an other problem, but I'm also to busy at university at the moment. I'll try your next version.
Thank you for the answer.

Report

Emeric

14 years ago

Excellent script, just what I had been looking for ages...

However, on my fresh gentoo install, i had trouble with it (images were not created) simply because xwininfo and bc were not installed...

You should add them to the list of requirements...

Report

C

nebbus

14 years ago

Sorry, I thought those were part of a standard install. Apparently not! I added both to the list of requirements. Glad to see that you liked the script, and thanks for helping out!

nebbus

Report

deloco

14 years ago

Hi! First of all, I love this Script! It's exactly what I want on Screen, when friends come over, or when I make a party! It's great!

But I have one problem... I have a Dual-Screen Setup, with an Ati Radeon 9500... So my Desktop is actually 2560x1024 Pixels... The Problem with KoverSS is, that it is displayed in the Middle of both Screens...
Is there a way to tell it, that the created image-size shall be 2560x1024 and to configure it so, that the Cover-Art will be displayed on the right Screen, and the SOnginfos on the left screen?
I already looked into the script, but I'm no good in finding out how such scripts work...

Report

C

nebbus

14 years ago

Thanks! Good to hear that you like the script!

Yes, I think I can help you with your problem.

On line 37 and 38 the screen resolution is set. Change HEIGHT and WIDTH to your values. (HEIGHT=1024 and WIDTH=2560)

On line 117 you can change '-gravity center' to '-gravity east'. This should put the cover art on your right screen. You could also try adding '-geometry -x-y' where x and y are integers (try x=400 and y=300 as a start).

I have not tried this as I do not have a dual-display like this (my second display is my TV, and that is a clone of my primary display).

Hope this helps!

Even

Report

deloco

14 years ago

Hm... I can't do something usefull with this geometry-setting... Istarted with 400/300 and the image was in a strange shape... I tried some other settings, fromm -100-100 to -600-480 in a variety of steps.... Didn's do anything useful...
How does this option work?

Report

C

nebbus

14 years ago

Sorry, I think I was a little bit quick. We will try something different...

On line 117 change:

composite -compose atop -gravity center $WORKDIR/cover.png $WORKDIR/song.png /$FINALDIR/final.png

into

composite -compose atop -geometry "+x+y" $WORKDIR/cover.png $WORKDIR/song.png /$FINALDIR/final.png

Now use x values bigger than the width of your left screen, and y value a bit smaller than your screen height. With '+' composite places the cover x and y pixels from the left and top edges. With '-' it was supposed to place it according to the bottom and right edges. But this did not work for me either.

Hope this helps!

Report

deloco

14 years ago

Ahhh! Now I understand! And it works... Right now I try to find out the perfect values for me... Thanks, I really like your script!

Report

C

nebbus

14 years ago

Glad you like the script! And glad to help!

That's the spirit of Linux!

Report

deloco

14 years ago

IT WORKS!
Dude, you totally rock!
That's a real cool script!
That is the thing I love about Linux! Such simpe things are possible and there is someone (YOU) o did it (or will do it)!

A little tuning and the Script is perfect!

Thanks a lot!

Report

freefred

14 years ago

This is great, many thx.

bye

Report

amigib

14 years ago

only if cover images would be little bigger, they are resized and this is not big problem but why they are so blury even when not resized? it dont look good

anyway script works very good :)

Report

C

nebbus

14 years ago

Thank you!

Open up the script and on line 33 you will find a variable "COVERFACTOR", change it to something bigger and the image will be bigger.

The variable is the size if the image relative to your screen resolution.

If you comment out line 98 the image will not be resized at all.

nebbus

Report

amigib

14 years ago

thanks, now size is ok

still its a shame that the image quality is so low, you know maybe why is this?

Report

C

nebbus

14 years ago

Thanks again for your feedback!

Turns out, Amarok's dcop function to get the URL of the cover image returns the URL of a small version of the image. When the image is resized the quality is heavily degraded. I have updated the script a bit. It now checks if a larger image exists and uses this instead of the small one. But I have found no way to do this if the image resides inside the album folder, it must have been retrieved with Amarok's amazon.com function.

Report

12 years ago

Version 0.5.0:
- Works with KDE4 (>= 4.0.5)
- Does not start the screensaver if computer is in use (KDE4 only)

Version 0.4.1:
- Restores your original screensaver settings when you stop or pause playback (as well as when you exit Amarok).

Version 0.4.0:
- More config options
- Added reflection
- xwininfo and bc no longer needed
- Settings not lost when you reconfigure
- Tracknumber not shown when there is none

Version 0.3.1:
- Fixed bug where screensaver did not find any images after being active for a while

Version 0.3:
- Takes care of Kopete status. No longer changes status on each trackchange.
- The screensaver stays active on trackchange. Amarok is no longer shown
- Changed the name from KoverSS to AmarokScreenSaver

Version 0.2.1:
- Regression fix, images have better quality again!

Version 0.2:
- Better configuredialog
- More screen-friendly. Creates more than one image with the text and cover art in different places.
- Various fixes and speed improvements

Version 0.1.2:
- Works even if user has no screensaver set (Thanks to David Hugas Germí )

Version 0.1.1:
- Cover image now has better quality

Version 0.1:
Here we go!

12345678910
Be the first to comment
koqep
Jan 29 2010
DaiVied
Dec 30 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.5.0
updated Jun 25 2008
added Sep 30 2006
downloads 24h
0
mediaviews 24h 0
pageviews 24h 1
System Tags addon