September 2011 Desktops


Recommended Posts

Can I have the info about the clock/weather combo, please?

It's GeekTool of OSX.

The rest are scripts:

Partly Cloudy weather text and temperature:

curl --silent "http://xml.weather.yahoo.com/forecastrss?p=85345&u=c" | grep -E '(Current Conditions:|C<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'

Uptime:

uptime | awk '{sub(/[0-9]|user\,|users\,|load/, "", $6); sub(/mins,|min,/, "min", $6); sub(/user\,|users\,/, "", $5); sub(",", "min", $5); sub(":", "h ", $5); sub(/[0-9]/, "", $4); sub(/day,/, " day ", $4); sub(/days,/, " days ", $4); sub(/mins,|min,/, "min", $4); sub("hrs,", "h", $4); sub(":", "h ", $3); sub(",", "min", $3); print "Uptime: " $3$4$5$6}'

Disk space line:

df -hl | grep 'disk0s2' | awk '{print $4" disk space free ("$5" of total space used)"}'

Used RAM:

top -l 1 | awk '/PhysMem/ {print "Used RAM: " $8 " "}' ;

Time:

date "+%l:%M %p"

Month:

date "+%B" | tr '[a-z]' '[A-Z]'

Day:

date "+%A" | tr '[a-z]' '[A-Z]'

Yahoo Weather icon depending on your city code

PHP Script I wrote to fetch icon from Yahoo.com as many others online didn't work properly. You want to put this script on your FTP server and call it from GeekTool Image item.

Btw "USAZ0162" is the city/state code you need to get for your own city/country. The easiest way to get it is on weather.yahoo.com page for your city, state and copy the link url from Extended Forecast and you will see your code. It looks like this:

f6237b09.png

When you copy the url on extended forecast this is your code:

http://global.ard.ya...ather/extended/USAZ0162?par=yahoo&site=www.yahoo.com&promo=extendedforecast&cm_ven=Yahoo&cm_cat=www.yahoo.com&cm_pla=forecastpage&cm_ite=CityPage

<?php
$file = file_get_contents('http://weather.yahoo.com/forecast/USAZ0162.html', true);

$divStart = "<div class=\"forecast-icon\" style=\"background:url('";
$strEnd = "'); _background-image/* */: none;";

$start = strpos($file, $divStart)+strlen($divStart);

$end = strpos($file, $strEnd);
$length = $end-$start;

$imagepath=substr($file, $start , $length);

$image=imagecreatefrompng($imagepath);
imagealphablending($image, true);
imagesavealpha($image, true);

header('Content-Type: image/png'); //Identifies itself as a PNG image
imagepng($image); //Outputs image contents

?>

Link to comment
Share on other sites

some of you may know the post I made last month, so thanks to you here is my practical desktop for the month of September :)

What's the name of the weather extension/app in Google Chrome?

Link to comment
Share on other sites

I'll probably change some stuff when I have free time

230522386.png

dude, i have the meteora theme too but it seems no matter what i do, i can't get the start orb to be like the one in the screenshot. i don't know what to do.

Link to comment
Share on other sites

dude, i have the meteora theme too but it seems no matter what i do, i can't get the start orb to be like the one in the screenshot. i don't know what to do.

you didn't replace explorer.exe or change the startbutton bitmap with a startbutton changer.

Link to comment
Share on other sites

It's GeekTool of OSX.

The rest are scripts:

Partly Cloudy weather text and temperature:

curl --silent "http://xml.weather.yahoo.com/forecastrss?p=85345&u=c" | grep -E '(Current Conditions:|C<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'

Uptime:

uptime | awk '{sub(/[0-9]|user\,|users\,|load/, "", $6); sub(/mins,|min,/, "min", $6); sub(/user\,|users\,/, "", $5); sub(",", "min", $5); sub(":", "h ", $5); sub(/[0-9]/, "", $4); sub(/day,/, " day ", $4); sub(/days,/, " days ", $4); sub(/mins,|min,/, "min", $4); sub("hrs,", "h", $4); sub(":", "h ", $3); sub(",", "min", $3); print "Uptime: " $3$4$5$6}'

Not for windows?

Disk space line:

df -hl | grep 'disk0s2' | awk '{print $4" disk space free ("$5" of total space used)"}'

Used RAM:

top -l 1 | awk '/PhysMem/ {print "Used RAM: " $8 " "}' ;

Time:

date "+%l:%M %p"

Month:

date "+%B" | tr '[a-z]' '[A-Z]'

Day:

date "+%A" | tr '[a-z]' '[A-Z]'

Yahoo Weather icon depending on your city code

PHP Script I wrote to fetch icon from Yahoo.com as many others online didn't work properly. You want to put this script on your FTP server and call it from GeekTool Image item.

Btw "USAZ0162" is the city/state code you need to get for your own city/country. The easiest way to get it is on weather.yahoo.com page for your city, state and copy the link url from Extended Forecast and you will see your code. It looks like this:

f6237b09.png

When you copy the url on extended forecast this is your code:

<?php
$file = file_get_contents('http://weather.yahoo.com/forecast/USAZ0162.html', true);

$divStart = "<div class=\"forecast-icon\" style=\"background:url('";
$strEnd = "'); _background-image/* */: none;";

$start = strpos($file, $divStart)+strlen($divStart);

$end = strpos($file, $strEnd);
$length = $end-$start;

$imagepath=substr($file, $start , $length);

$image=imagecreatefrompng($imagepath);
imagealphablending($image, true);
imagesavealpha($image, true);

header('Content-Type: image/png'); //Identifies itself as a PNG image
imagepng($image); //Outputs image contents

?>

Not for Windows?

Link to comment
Share on other sites

you didn't replace explorer.exe or change the startbutton bitmap with a startbutton changer.

This is the state of Windows customization now? Replacing explorer.exe? :s

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.