adjustable clock javascripting


after some time 😀 … adjustable clock got the javascript support.I got a chat with Michal D and he was very open to ideas for aclock anyway this is the first test 😀

Open destkop console

qdbus org.kde.plasma-desktop /MainApplication showInteractiveConsole

copy and paste this code in the destkop console :
example :

 
 var panel = new(Panel)
var clock =  panel.addWidget("adjustableclock") 
clock.writeConfig("clipboardExpressions","Clock.toString(Clock.Time\\, {'short': true}),Clock.toString(Clock.Time),,Clock.toString(Clock.Date\\, {'short': true}),Clock.toString(Clock.Date),,Clock.toString(Clock.DateTime\\, {'short': true}),Clock.toString(Clock.DateTime),Clock.toString(Clock.Year) + '-' + Clock.toString(Clock.Month) + '-' + Clock.toString(Clock.DayOfMonth) + ' ' + Clock.toString(Clock.Hour) + ':' + Clock.toString(Clock.Minute) + ':' + Clock.toString(Clock.Second),,Clock.toString(Clock.Timestamp)")
clock.writeConfig("theme","dbclock")
Advertisements

yawp javascript for panels on kde4


here shouold be the code to configure yawp but… it DOESN’T WORK :S i have tried but no
it doesn’t do the job

this code works only if you have compiled the latest version of yawp (jan 2012 it’s 0.4.3)

var yawp = panel.addWidget("yaWP");

yawp.writeConfig("animation.daysnames","8");
yawp.writeConfig("animation.details","1");
yawp.writeConfig("animation.duration","500");
yawp.writeConfig("animation.icon","3");
yawp.writeConfig("animation.page","8");
yawp.writeConfig("custom.fontcolor.lowtemp","30,28,27");
yawp.writeConfig("custom.fontcolor.normal","20,19,18");
yawp.writeConfig("custom.fontcolor.shadows","255,255,255,100");
yawp.writeConfig("custom.fontcolor.usage","false");
yawp.writeConfig("custom.theme.background.enabled","false");
yawp.writeConfig("custom.theme.enabled","false");
yawp.writeConfig("custom.theme.file","");
yawp.writeConfig("panel.forecast.days","5");
yawp.writeConfig("panel.forecast.format","3");
yawp.writeConfig("panel.layout.compact","false");
yawp.writeConfig("panel.today.format","3");
yawp.writeConfig("panel.tooltip.extended.enabled","true");
yawp.writeConfig("panel.tooltip.extended.format","5");
yawp.writeConfig("start delay","0");
yawp.writeConfig("system.distance","2007");
yawp.writeConfig("system.pressure","5007");
yawp.writeConfig("system.speed","9001");
yawp.writeConfig("system.temperature","6001");
yawp.writeConfig("text.shadows","false");
yawp.writeConfig("theme","default");
yawp.writeConfig("traverse locations","false");
yawp.writeConfig("traverse locations timeout","30");
yawp.writeConfig("update interval","45")

yawp.currentConfigGroup = new Array('locations')

yawp.writeConfig("city01",'accuweather,Verona\\, Italy(Veneto),Italy,it,EUR.IT.IT020.VERONA,Europe/Rome');
yawp.writeConfig("selected","0");

yawp.currentConfigGroup = new Array('ExtenderItems')

yawp.writeConfig(" extenderItemPosition","0");

weather applet on kde4 panels javascripted


var weather = panel.addWidget("weather");
weather.writeConfig("Share","false");
weather.writeConfig("pressureUnit","5008");
weather.writeConfig("source","bbcukmet|weather|Venice, Italy|http://newsrss.bbc.co.uk/weather/forecast/64/ObservationsRSS.xml");
weather.writeConfig("speedUnit","9001");
weather.writeConfig("temperatureUnit","6001");
weather.writeConfig("updateInterval","30");
weather.writeConfig("visibilityUnit","2007");