This is what I've got running on my Vista sidebar at the moment (top to bottom):
Now, there's two reasons I modded the Network Utilization gadget: a)It didn't fit in with the rest of them and b) at speeds of over 1024KB/s, it just shows "1MB" until it get's to 2048KB/s, then it shows "2MB". Due to having 16meg, my download speeds are around 1.75MB/s and I like to know whats going on in between those figures, so I did a bit of modding...
When you install it, it'll look like this:
Double click and it looks like this:
Now, to get it to look like the one on my sidebar...
...navigate to "C:Users\%user_name%AppDataLocalMicrosoftWindows SidebarGadgetsNetworkUtilizationv1.1.1.0.Gadget", open "gadget.js" in Wordpad and look for this bit:
//update bar
var sentKB = parseInt(bytesSentPerSec/1024);
var receivedKB = parseInt(bytesReceivedPerSec/1024);
divReceived.innerText = divReceived2.innerText = (receivedKB > 1024) ? parseInt(receivedKB/1024) + " MB" : receivedKB + " KB";
divSent.innerText = divSent2.innerText = (sentKB > 1024) ? parseInt(sentKB/1024) + " MB" : sentKB + " KB";
...then change it to read:
var sentKB = parseInt(bytesSentPerSec/1024);
var receivedKB = parseInt(bytesReceivedPerSec/1024);
divReceived.innerText = divReceived2.innerText = "RX: " + receivedKB + " KB/s";
divSent.innerText = divSent2.innerText = "TX: " + sentKB + " KB/s";
That's the code done, now you need to change the colour scheme. In the Network Utilization folder, open "gadget.html" and find this bit:
<div id="divBars" style="top:0px; left:0px; width:100%; height:100%; display:none;">
<v:shape id="barReceivedBack" style="top:24px; left:16px; height:39px; width:224px;" type="#box" strokecolor="rgb(0,55,0)" fillcolor="rgb(20,55,20)" />
<v:shape id="barSentBack" style="top:89px; left:16px; height:39px; width:224px;" type="#box" strokecolor="rgb(55,0,0)" fillcolor="rgb(55,20,20)" />
<v:shape id="barReceived" style="top:29px; left:20px; height:31px; width:0px;" type="#box" strokecolor="rgb(0,185,0)" fillcolor="rgb(50,150,50)" />
<v:shape id="barSent" style="top:93px; left:20px; height:31px; width:0px;" type="#box" strokecolor="rgb(185,0,0)" fillcolor="rgb(150,50,50)" />
<div style="top:10px; left:16px; width:200px; height:144px; text-align:center;">
<div id="divReceived" style="top:22px; color:lime;"></div>
<div id="divSent" style="top:86px; color:red;"></div>
</div>
...and change it to:
<div id="divBars" style="top:0px; left:0px; width:100%; height:100%; display:none;">
<v:shape id="barReceivedBack" style="top:24px; left:16px; height:39px; width:224px;" type="#box" strokecolor="rgb(0,108,189)" fillcolor="rgb(21,42,57)" />
<v:shape id="barSentBack" style="top:89px; left:16px; height:39px; width:224px;" type="#box" strokecolor="rgb(0,108,189)" fillcolor="rgb(21,42,57)" />
<v:shape id="barReceived" style="top:29px; left:20px; height:31px; width:0px;" type="#box" strokecolor="rgb(58,182,255)" fillcolor="rgb(58,182,255)" />
<v:shape id="barSent" style="top:93px; left:20px; height:31px; width:0px;" type="#box" strokecolor="rgb(58,182,255)" fillcolor="rgb(58,182,255)" />
<div style="top:10px; left:-10px; width:200px; height:144px; text-align:center;">
<div id="divReceived" style="top:22px; color:white;"></div>
<div id="divSent" style="top:86px; color:white;"></div>
</div>
That's it, done! :D Now it matches the others and works a bit better to boot ;)
Update: Actually, that's not quite it. I noticed that after reboot, you have to double click the gadget again to get it to show the bars instead of the graph - that's just annoying. So, to fix this, open up the gadget.html again and look for:
<BODY onload="startUpGadget()" onunload="terminate()" ondblclick="switchDisplay()">
and change it to:
<BODY onload="startUpGadget(); switchDisplay()" onunload="terminate()" ondblclick="switchDisplay()">
There, now it's done ;)
Update 2: Jon Abbott, creator of this gadget, has now release ver 1.1.3.0 which fixes the 1MB/s+ display bug and now allows it to remember which state (graph/bars) it was in. The new ver still needs a bit of modification if you have changed it's colour scheme however (so you know which is received and which is sent ;) ). So, this time, open the gadget.js and find:
divReceived.innerText = divReceived2.innerText = (receivedKB > 1024) ? fixValue(String(receivedKB/1024).substring(0,4)) + " MB" : receivedKB + " KB";
divSent.innerText = divSent2.innerText = (sentKB > 1024) ? fixValue(String(sentKB/1024).substring(0,4)) + " MB" : sentKB + " KB";
and change it to:
divReceived.innerText = divReceived2.innerText = (receivedKB > 1024) ? "RX: " + fixValue(String(receivedKB/1024).substring(0,4)) + " MB/s" : "RX: " + receivedKB + " KB/s";
divSent.innerText = divSent2.innerText = (sentKB > 1024) ? "TX: " + fixValue(String(sentKB/1024).substring(0,4)) + " MB/s" : "TX: " + sentKB + " KB/s";
Done, again :)
|