Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

4
Become a Fan
7.6

Description:
This is intended as a more streamlined analogue of the standard "Now Playing" plasmoid. Instead of a collection of buttons and sliders, only the title and album art of the currently-playing track are shown, and can be clicked to advance to the next track (or resume playback, as appropriate). Obviously, this won't be much use to those that don't use album art, but in my case, I find it to be a more concise way of accessing the playback functionality I most commonly use.

Requires Plasma 4.5. Currently there is no support for placing the plasmoid inside a panel.

The default image shown when no album art is available is thanks to Amarok.
Last changelog:

0.2.3:
- Improved corner rounding of album art.

0.2.2:
- Fixed bug in configuration loading.

0.2.1:
- Added configuration interface for main background.
- Fixed restoration of config settings.

0.2:
- Added configuration interface for text background.
- Better handling of odd Amarok behaviour
- Fixed action-icon glitch when all sources are removed.

0.1:
- Initial release.


Ratings & Comments

24 Comments

iten

There is error that are displayed each seconds in .xsession-errors: Traceback (most recent call last): File "/home/toto/.kde4/share/apps/plasma/plasmoids/current-song/contents/code/main.py", line 180, in dataUpdated songID = self.songIDStr(data) File "/home/toto/.kde4/share/apps/plasma/plasmoids/current-song/contents/code/main.py", line 310, in songIDStr return "%s [%i] -- %s, #%i" % (title, length, album, track) TypeError: %d format: a number is required, not QVariant

Maarty

keystonerose Nice job! could you increase maximum size of the plasmoid in future releases? It looks pretty small on my 27" monitor.

ingvarg

good work, but I find something strange - when I choose to disable the background of plasmoid and then reboot - the background returns what can I do to fix it?

keystonerose

Sorry about that; stupid mistake on my part. It should be fixed now.

ingvarg

hmm it isn't (: nvm, all is great, i'm ur fan (;

ingvarg

oh, sry about that, a bit drunked used old version, I'll test the new version

ingvarg

yeah, everything works perfect but plasma tells me it is version 0.2.1 (:

vexxed

The plasmoid works much better now. Excellent job. The only thing that I wouldn't mind is the ability to pause the current song. And for anyone who needs to use my method (described above) to make it work on Plasma 4.4 or lower, the line that needs to be commented out is at 191. For future reference (and so I don't have to repost this with every update), just search the file for self.iconWidget.setMaximumIconSize(QSizeF(self.MAX_ICON_SIZE, self.MAX_ICON_SIZE)) and comment it out by putting a # infront of it. Save, install, voila.

keystonerose

Mm, I was considering that. The trick would be to somehow visually distinguish the primary action performed by clicking on the album art from any secondary actions available as overlay icons. Perhaps the icon for the primary action should appear in the centre of the image rather than in the corner? It'd be kinda tricky to implement, though, but should work.

vexxed

Well, the way you have it now has two spaces, right? You've got the Album Art and then the Song Title. Click the art and the song changes. Why not make it pause when you click the song name?

keystonerose

Even though they appear separate, they're parts of a singular IconWidget entity. Plus, it's difficult to draw a semantic difference between activating text representing a song, and an image representing a song.

vexxed

What about a line between the text and the art? So, when a person clicks, the program checks to see where the click was and runs the appropriate function. Of course, the line would have to be relative, but that shouldn't be too difficult. def onClick If mouse.y is less-than middleLine change song; if mouse.y is equal-to or greater-than middleLine pause song; (Forgive me if I'm way off the mark here.)

Githzerai

Thanks for this one, very simple, but also very efficient. However, would it be possible to add some sort of font config dialog (even the most simplest one)? Depending on used plasma theme and wallpaper, it might become difficullt to read song titles, like here: http://tinyurl.com/356avj4 Cheers.

keystonerose

Good point. Unfortunately the widget that I am using does not support changing the font, but I have added a configuration interface for changing the text background, which may help you.

Githzerai

Thanks, this is much, much better. I think that that this would be more than enough for majority of plasma theme/background combinations, or at least for those I've tried. Great job, Cheers.

vexxed

I got it to install fine, but whenever I drag the widget to the desktop it just says This object could not be created for the following reason: Script initialisation failed. Any solutions? Mandriva 2010.1 KDE 4.4.3

keystonerose

Huh, that's not so good... Unfortunately, I can't reproduce here, but I recall having had a similar problem with some other plasmoids that came right upon restarting Plasma. I haven't tested the plasmoid with Plasma 4.4, either, so perhaps that's it? I'm not sure what different that would make, though.

vexxed

Did some poking around and found a solution to this problem. Plasma <4.5 has a problem with line 146 in main.py. So, you have to extract the plasmoid, go in to the folder /129891-current-song-0.1/contents/code and then open main.py and comment out line 146 by putting a # infront of it. It should look like this: #self.iconWidget.setMaximumIconSize(QSizeF(self.MAX_ICON_SIZE, self.MAX_ICON_SIZE)) Save the file, then cd back until you're outside of the plasmoid folder. Finally, just do plasmapkg -i /129891-current-song-0.1/ and it should install. The only bug I've encountered so far is that most of the time the album art doesn't show up.

vexxed

Correction: Album art AND song title don't show up.

keystonerose

I've been able to reproduce some strange behaviour with Amarok -- it will sometimes report that it has stopped playing when it is just changing tracks -- which for me occasionally caused the plasmoid to become blank. I made some changes to the way the play-state is tracked, and haven't observed the problem since, so hopefully this may address your issue.

Lole

I tried to install this plasmaoid on kde 4.5.1 from shell with "plasmapkg -i 129891-current-song-0.1.plasmoid" but then I see this error: "KConfigIni: In file /tmp/kde-lorenzo/plasmapkgScHPSm/metadata.desktop, line 1: " Invalid entry (missing '=') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkgScHPSm/metadata.desktop, line 2: " Invalid entry (missing '=') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkgScHPSm/metadata.desktop, line 3: " Invalid entry (missing ']') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkgScHPSm/metadata.desktop, line 4: " Invalid entry (missing '=') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkgScHPSm/metadata.desktop, line 7: " Invalid entry (missing '=') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkg9vjd5g/metadata.desktop, line 1: " Invalid entry (missing '=') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkg9vjd5g/metadata.desktop, line 2: " Invalid entry (missing '=') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkg9vjd5g/metadata.desktop, line 3: " Invalid entry (missing ']') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkg9vjd5g/metadata.desktop, line 4: " Invalid entry (missing '=') "KConfigIni: In file /tmp/kde-lorenzo/plasmapkg9vjd5g/metadata.desktop, line 7: " Invalid entry (missing '=') plasmapkg(1961)/libplasma Plasma::Package::installPackage: Package plugin name not specified Installazione di /home/lorenzo/129891-current-song-0.1.plasmoid non riuscita.

bitcrazy

Same here. openSUSE 11.3 KDE 4.5.1 Qt 4.6.3

keystonerose

As far as I know, this is a packaging problem with Plasma 4.5: https://bugs.kde.org/show_bug.cgi?id=249980 https://bbs.archlinux.org/viewtopic.php?pid=820108 As a workaround, you can extract the contents of the .plasmoid file (which is actually a ZIP archive), then run plasmapkg -i . in the extracted directory.

Lole

Thank you! Now it works! You should add to the description this way to install it (plasmapkg -i .)

Pling
0 Affiliates
Details
license
version 0.2.3
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Plasma 4 Extensions:

Icon Tasks deb build
N00bun2
last update date: 13 years ago

Score 4.3

Prayer Times Plasmoid
riyad
last update date: 13 years ago

Score 5.2

KPrayertime4 Islamic Prayer Times
ahaq
last update date: 15 years ago

Score 4.4

Hostinfo
mgraesslin
last update date: 13 years ago

Score 4.7

Monitor QuadCore Russian
kuchumovn
last update date: 16 years ago

Score 5.0

blaKjaK
werevire
last update date: 15 years ago

Score 5.0