added a now playing applet, will be the simplest way to test services
svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=906016
This commit is contained in:
parent
d86e988bc6
commit
a78c297a30
@ -0,0 +1,14 @@
|
||||
plasmoid.dataUpdate = function(a, b)
|
||||
{
|
||||
for ( var i in b ) {
|
||||
print(i + ' -> ' + b[i] );
|
||||
}
|
||||
label.text = "Playing " + b.Title + " by " + b.Artist + ". time: " +
|
||||
parseInt(b.Position/60) + ":" + (parseInt(b.Position)%60);
|
||||
}
|
||||
|
||||
layout = new LinearLayout(plasmoid);
|
||||
label = new Label();
|
||||
layout.addItem(label);
|
||||
|
||||
plasmoid.dataEngine("nowplaying").connectSource("org.mpris.amarok", plasmoid, 500);
|
@ -0,0 +1,17 @@
|
||||
[Desktop Entry]
|
||||
Name=script-nowplaying
|
||||
Comment=Javascript version current track playing
|
||||
Icon=configure
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=Plasma/Applet
|
||||
X-Plasma-MainScript=code/main.js
|
||||
X-KDE-PluginInfo-Author=Marco Martin
|
||||
X-KDE-PluginInfo-Email=notmart@gmail.com
|
||||
X-KDE-PluginInfo-Name=script-nowplaying
|
||||
X-KDE-PluginInfo-Version=0.0
|
||||
X-KDE-PluginInfo-Website=http://plasma.kde.org/
|
||||
X-KDE-PluginInfo-Category=Utilities
|
||||
X-KDE-PluginInfo-Depends=
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
X-Plasma-API=javascript
|
Loading…
Reference in New Issue
Block a user