|
|
![]() |
||
![]()
- Almost Missed -
- Entertainment -
- Life -
- Now Playing -
- Off the Radar -
- On The Radar -
- Opinion -
- Reading & Writing -
- Silly Stuff -
- Tech Stuff -
- Top 10ish -
![]()
|
Konfabulator - "whatever you want it to be" Tech Stuff, Top 10ish Posted by: KillJoy - June 30, 2005 09:41 PM I've espoused the features and benefits of Konfabublator to a few friends, but somehow forgot to mention it here. So here goes... Konfabulator is a scripting language and framework to build widgets--CPU meters, RSS readers, clocks, WiFi signal meters, and much, much more. Take a gander at the screen below that shows my desktop and the various widgets I employ on my desktop. (As with most images here, click on the image for a larger view.) Konfabulator comes with a handful of widgets and the Konfabulator website has a Widget Gallery filled with more pre-made widgets from the Konfabulator crew and the general public. If there isn't a widget to suit your needs you can use the XML-style framework to define your widget's window, features, etc and JavaScript to control it. The whole kit and kaboodle is packaged in a ZIP archive with a .widget extension. The code below creates a simple clock that updates every 5 seconds: SimpleClock.kon (XML framework)
<?xml version="1.0" encoding="UTF-8"?>
<widget>
<debug>on</debug>
<window>
<title>Simple Clock</title>
<name>main_window</name>
<width>200</width>
<height>100</height>
<opacity>255</opacity>
</window>
<text>
<name>SimpleClock</name>
<hOffset>30</hOffset>
<vOffset>30</vOffset>
<data></data>
<size>36</size>
</text>
<action trigger="onLoad" file="SimpleClock.js" />
<timer>
<name>ClockTimer</name>
<ticking>false</ticking>
<interval>5</interval>
<onTimerFired>
TimerUpdate();
</onTimerFired>
</timer>
</widget>
SimpleClock.js (JavaScript code)
<!--
function TimerUpdate() {
t = new Date();
h = t.getHours();
m = t.getMinutes();
if ( m < 10 ) { m = "0" + m; }
if ( h <= 12 ) {
ampm = "am";
} else {
h = h - 12;
ampm = "pm";
}
SimpleClock.data = h + ":" + m + " " + ampm;
}
TimerUpdate();
ClockTimer.ticking = true;
// -->
Of course, the widget above doesn't use any graphics or advanced features of Konfabulator, but it illustrates how easy it is to build widgets. Konfabulator supports both Mac and Windows platforms, is free for evaluation (nag-ware), and $19.95 for extended use. |
Comments (0) |
[Link] |
|
|
Powered by
Movable Type |
Unless otherwise noted all content is Copyright © 2005 "KillJoy's Radar." ![]() KillJoy's Radar is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License. |