I recently made a vey simple Win7 desktop gadget to display the output from my temperature probe and thought I'd share it.
Start by creating a folder in \Program Files\Windows Sidebar\Gadgets. The folder should be named <Gadget name>.Gadget. For this example I used Temperature.Gadget. There are two files you need to place in this folder. First is an XML file called gadget.xml. Here is my example (the name parameter should match the name you used in the folder name):
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>Temperature</name>
<version>1.0.0.0</version>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="Temperature.html" />
<permissions>FULL</permissions>
<platform minPlatformVersion="1.0" />
</host>
</hosts>
</gadget>
The second file is <Gadgetname>.html. Here is my example (Temperature.html):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=unicode" />
<style type="text/css">
body{
margin: 0;
width: 300px;
height:30px;
font-family: Georgia;
}
#gadgetContainer{
margin-top:6px;
width:300px;
height:30px;
}
</style>
</head>
<body>
<div id="gadgetContainer">
Current Temperature: <Copy and paste your widget script here>
</div>
</body>
</html>
This is a very bare-bones gadget. Feel free to dress up the HTML to make a better looking gadget.