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")

kwin button close minimize on your panel kubuntu 12.04



So you want minimize your screen use ?!

ok le’s put kwin buttons on the panel with kde4.8

just download this http://kde-apps.org/content/show.php/KWin+Button+applet+improved?content=143971

INSTALL DEPENDENCIES

now as usual NOTE IF CMAKE GIVES ERRORS… just install the dev packages … it should be

kdebase-workspace-dev kdelibs5-dev

NOW EXTRACT AND DO THIS IN THE FOLDER …

  mkdir build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. ;make ; sudo make install ;  kbuildsycoca4  #cpack ..
 

kate $HOME/.kde/share/config/kwinrc

you should locate [Windows] and make sure there is this stuff

 
 [Windows] 
<del>BorderlessMaximizedWindows=true

Use just add 4 buttons

THIS IS OLD AND THE PACKAGED GENERATED WITH CPACK DOENS’T WORK PROPERLY.
and now create your own debian package with cmake and cpack …

1 extract
2 edit your CMakeLists.txt adding this shit

</del>
<del>SET(MAJOR_VERSION "0")</del>
<del>SET(MINOR_VERSION "5")</del>
<del>SET(PATCH_VERSION "0")</del>

<del>IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")</del>
<del>INCLUDE(InstallRequiredSystemLibraries)</del>

<del>SET(CPACK_SET_DESTDIR "on")</del>
<del>SET(CPACK_PACKAGING_INSTALL_PREFIX "/tmp")</del>
<del>SET(CPACK_GENERATOR "DEB")</del>

<del>SET(CPACK_PACKAGE_DESCRIPTION "Plasmoid to add kwin button on your panel")</del>
<del>SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "kwin button applet is a plasmoid to add kwin buttons on your pannel just add 3 buttons for minimize maximize and close , you can even add the icon button")</del>
<del>SET(CPACK_PACKAGE_VENDOR "Vendor")</del>
<del>SET(CPACK_PACKAGE_CONTACT "Stefan Majewsky Alberto Pajuelo Montes Aliaksandr Stelmachonak")</del>
<del>SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")</del>
<del>SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")</del>
<del>SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")</del>
<del>SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")</del>
<del>SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")</del>

<del>SET(CPACK_DEBIAN_PACKAGE_DEPENDS " libplasma3 , plasma-desktop ")</del>
<del>SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")</del>
<del>SET(CPACK_DEBIAN_PACKAGE_SECTION "kde")</del>
<del>SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})</del>

<del>SET(CPACK_COMPONENTS_ALL Libraries ApplicationData)</del>
<del>INCLUDE(CPack)</del>

<del>ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")</del>

<del>


now as usual NOTE IF CMAKE GIVES ERRORS… just install the dev packages … it should be

kdebase-workspace-dev kdelibs5-dev

  mkdir build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. ;make ; sudo make install ;  cpack ..</del>
<del> 


NOTE THE PACKAGE GENERATED WILL NOT WORK …
on build folder there is your own package ,… just install it

now upgrade the plasmoid list with

 kbuildsycoca4 


set kwin to show the border only when the windows is not maximized

kate $HOME/.kde/share/config/kwinrc

you should locate [Windows] and make sure there is this stuff

</del>
<del>[Windows]</del>
<del>BorderlessMaximizedWindows=true


Use just add 4 buttons

and set them … close maximize iconfy and of course set them to be visible only when the window is maximize .. right click on the button … settings etc etc …

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");