PDA

View Full Version : [Geektool] Post your GeekTool Desktops


Pages : 1 [2]

yetiboy
Sep 12, 2013, 01:18 AM
There used to be a thread with Geektool scripts. Is this not the equivalent, kind of?

A better fix may be to use a different service. The weather channel has icons too. I used this script:

curl --silent "http://www.weather.com/weather/right-now/ZIPCODE" | grep -E -o 'http://s.imwx.com/v.20120328.084208//img/wxicon/120/.*png' | head -1 | xargs curl -o /tmp/weather.png

Taken from this posthttp://forums.macrumors.com/showpost.php?p=15540918&postcount=17

However, you need to make a slight adjustment to the image URL. To find the image url, just have a look at the page source.

Got it after a bit of playing with the url of both the page and the image. This worked for me for my location, should work for anyone else if they just change the ending of the first url to their location:

curl --silent "http://www.weather.com/weather/today/Pembroke+CAXX0354:1:CA" | grep -E -o 'http://s.imwx.com/v.20130819.175643/img/wxicon/120/.*png' | head -1 | xargs curl -o /tmp/weather1.png

Thanks for the help, yojitani.

yeti

tag
Sep 12, 2013, 12:11 PM
Got it after a bit of playing with the url of both the page and the image. This worked for me for my location, should work for anyone else if they just change the ending of the first url to their location:

curl --silent "http://www.weather.com/weather/today/Pembroke+CAXX0354:1:CA" | grep -E -o 'http://s.imwx.com/v.20130819.175643/img/wxicon/120/.*png' | head -1 | xargs curl -o /tmp/weather1.png

Thanks for the help, yojitani.

yeti

I have come across a problem with the image URL in these weather.com image retrieval codes. The /v.xxxxxxxx.xxxxxx/ part of the URL keeps changing. So I rewrote it which seems to do the trick....

curl --silent "http://www.weather.com/weather/today/[ZIPCODE or Weather.com location ID]" | grep -E '/img/wxicon/120/.*png' | head -1 | cut -f 2 -d '"' | xargs curl -o /tmp/weather.png

sombra2
Sep 14, 2013, 04:34 AM
Hi everybody,

my first post here. I have to thank you all for all I have learned with this thread and the previous ones about GeekTool.

I am having some issues with a script. I want it to show my public adress via airport, ethernet, private ip and SSID.

#!/usr/bin/perl

$en0_info = `ifconfig en0 | grep "inet" | grep -v 127.0.0.1`;
$en1_info = `ifconfig en1 | grep "inet" | grep -v 127.0.0.1`;
$ext_info = `curl --silent http://checkip.dyndns.org | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}'`;
$airport_network = `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk -F: '/ SSID: / {print $2}' | sed -e 's/.*SSID: //'`;
if($ext_info) {
$output .= "External: $ext_info";
} else {
$output .= "External: OFFLINE \n";
}
if($en0_info) {
$en0_info =~ /inet (.*) netmask/s;
$output .= "Ethernet: $1 \n";
} else {
$output .= "Ethernet: INACTIVE \n";
}
if($en1_info) {
$en1_info =~ /inet (.*) netmask/s;
$en1_info = $1;
$output .= "Airport: $en1_info \n";
$output .= "SSID: $airport_network";
} else {
$output .= "Airport: INACTIVE";
}
print "$output";


The main problem is that I am behind a private proxy, and it keeps me showing my IP public adress before the proxy. If I go to http://checkip.dyndns.org in my browser it returns me my proxy IP, the way it should be, but for some reason the geetlet doesn't show it. The main reason to use this geeklet was to know when I was behind the proxy and when I wasn't, so for the moment is not very useful...

any help please?

Cheers

P.D.- sorry for my english, I am not anglophone

skippymac
Sep 14, 2013, 05:21 AM
I wish I knew AppleScript, because I want this!

I don't even know how to get the text in the circle..then I don't know how to use that circle for the other scripts..:(

Anybody have some good links on how to figure this stuff out?

Hi sorry for the late reply, I've not been around as I've been travelling for a couple of months. I get back home next week so if this post doesn't help I'll be happy to make a more comprehensive guide then. :)

I will assume from your other post that you figured out the text okay, and you seem to have the battery working. The itunes one also has its own instructions. (Note: I used the 95% and 100% images from the itunes geeklet because in the original they are red and I wasn't a fan, and I'm not a great image manipulator!)

I made copies of the DiskCapacityMeter folder in my chosen geektool directory, each with a copy of the images (this was a bad idea, when I get a second I'll be getting them to refer to a shared directory to save space). The scripts I simply changed the paths to their relevant folders, and changed the core of the script to get the information I wanted.

I'll run through the changes I made here:

For each one I'll post the script changes I made from the DCM.scpt, this is between setting the path name and when you round the number to 5 to get the right image.

CPU Usage/Temp

set percTotal to 0

repeat 5 times

set percIdle to (do shell script "top -l2 | grep \"CPU usage\" | tail -1 | awk '{sub(/%\\ i/, \"\\ \");print $7}'") as number

set percTotal to percIdle + percTotal

end repeat

set percAv to percTotal / 5

set perc to 100 - percAv

This takes the cpu usage 5 times and averages them, as you get very erratic values otherwise, and it's pretty meaningless.

For the temperature I used this command directly in the geektool pane:

/Applications/TemperatureMonitor.app/Contents/MacOS/tempmonitor | awk '{sub(/ C/, "ºC");print}'

You'll need to install the app from here (http://www.bresink.com/osx/TemperatureMonitor.html). I can't remember the exact install process to get the terminal tools. The rest of the command just appends the degree symbol. You'll have to play around if you want Fahrenheit, I would probably just do the maths in the command line.

Fan Speed

set fanSpeed to (do shell script "/Applications/smcFanControl.app/Contents/Resources/smc -f | grep \"Actual speed\" | awk '{print $4}'") as integer

if fanSpeed < 2000 then

set fanSpeed to 2000

end if

set fanPerc to (fanSpeed - 2000) / 42

This gets the percentage of fan speed, the minimum on my machine is 2000 rpm, hence the maths. In practice the speed can drop as low as 1960 or so, which is why I set it to 2000 if it's less, otherwise it can't find the image for -5% etc.

The text is simpler, because you can just display the actual number. /Applications/smcFanControl.app/Contents/Resources/smc -f | grep "Actual speed" | awk '{print $4}'

I already had smcFanControl (http://www.eidac.de) installed, but I can't remember if it required any more changes to use the terminal tools.

Memory Usage

set usedSpace to (do shell script "top -l1 | grep \"PhysMem\" | awk '{sub(/M\\ f/, \"\\ \");print $10}'") as integer

set usedPerc to (1 - (usedSpace / 8191)) * 100

This checks the memory usage twice, as the first reading is always way off, then gets the percentage used. You can modify this to get it to display what you want. Currently it takes the free memory and gets the percentage that way. That assumes active and wired memory are in use, while inactive and used memory are available. If you want to assume used memory as in use (which it technically is, but is still available if needed) then use the value for inactive memory instead. changing the "f" (for free) to an "in" (for inactive) should probably work.

top -l1 | grep "PhysMem" | awk '{sub(/M\ f/, " ");printf "%3.2f", (8191-$10)/1024;printf "GB"}'

This is the command for the text.

If you need any more help let me know. I didn't proof read this either so if it makes no sense I'll try to clarify. Finally, I'm no expert in geektool or apple script, and this is the first time I've used either, so no judging my possibly questionable methods!

P.S. Your name is hilarious!

ljusmc
Sep 14, 2013, 06:09 AM
Does anyone have the iTunes album art step by step? I searched and found the one but I just cant seem to get it to work.

kay.87
Sep 14, 2013, 05:26 PM
can somebody share this script?

ItHurtsWhenIP
Sep 14, 2013, 08:46 PM
Hi sorry for the late reply, I've not been around as I've been travelling for a couple of months. I get back home next week so if this post doesn't help I'll be happy to make a more comprehensive guide then. :)

P.S. Your name is hilarious!

LOL. :D

Thanks for the reply!

I'll give it a go, do some homework and see how it turns out, but please feel free to elaborate when you get a chance. I'll be happy to read a more in-depth guide.

Kyp
Sep 15, 2013, 08:38 AM
Morning all,
I am looking for information on the scripting language that geektool uses.
I am want understanding and knowledge so that I can create my own custom scripts. I am not one that likes to be spoon fed, or just copy & paste. So if anyone could point me in the right direction I would appreciate it.
Thanks,
Kyp

tag
Sep 16, 2013, 01:58 PM
Today I downloaded an app called Hermes (http://alexcrichton.com/hermes/) which is a standalone Pandora Radio client (which seems pretty decent, and also can apparently bypass the skip limit somehow which is nice). It seems that no one has written any geektool scripts to display song info, so I wrote up my own.



on run
tell application "System Events"
set num to count (every process whose name is "Hermes")
end tell
if num > 0 then
tell application "Hermes"
get playback state
set stationname to the current station's name
set titlename to the current song's title
set artistname to the current song's artist
set albumname to the current song's album
set albumart to current song's art
if playback state is not paused then
set info to "Streaming: Pandora Radio" & " -- Station: " & stationname & " -- Artist: " & artistname & " -- Title: " & titlename & " -- Album: " & albumname
else
set info to "Pandora Radio is Paused"
end if
end tell
end if
return info
end run


If you would prefer the info to be stacked instead of in a straight line, replace line 14 with the following...

set info to "Streaming: Pandora Radio" & "\n Station: " & stationname & "\n Artist: " & artistname & "\n Title: " & titlename & "\n Album: " & albumname

Save the file as whatever (I used Hermes.scpt), and in Geektool set as a shell command, and use the following command (change directory as needed)...

osascript /Users/USER/WHEREVER/Hermes.scpt

Just thought I'd share in case anyone else uses this app.
[screenshot attached]

Kyp
Sep 17, 2013, 07:52 AM
This may have been discussed before, but I have searched, and could not find an answer.

Is there anyway (in GeekTool) to remove/convert the &apos to an actual apostrophe in my rss feed?

Thanks,
Kyp

tag
Sep 17, 2013, 08:39 AM
This may have been discussed before, but I have searched, and could not find an answer.

Is there anyway (in GeekTool) to remove/convert the &apos to an actual apostrophe in my rss feed?

Thanks,
Kyp

Using 'sed' to replace should work, something like...

sed "s/\&apos/'/g"

Kyp
Sep 17, 2013, 10:54 AM
Being that I am a new mac user, and a new GT user, where would I insert the line in this script?
sed "s/\&apos/'/g"

#URL="http://www.thetowntalk.com/rssfeeds/topstories.xml"
URL="http://www.thetowntalk.com/rssfeeds/topstories.xml"
maxLength="600"
start="3"
end="9"

curl --silent "$URL" |
sed -e :a -e '$!N;s/\n//;ta' |
sed -e 's/<title>/\
<title>/g' |
sed -e 's/<\/title>/<\/title>\
/g' |
sed -e 's/<description>/\
<description>/g' |
sed -e 's/<\/description>/<\/description>\
/g' |
grep -E '(title>|description>)' |
sed -n "$start,$"'p' |
sed -e 's/<title>//' |
sed -e 's/<\/title>//' |
sed -e 's/<description>/ /' |
sed -e 's/<\/description>//' |
sed -e 's/<!\[CDATA\[//g' |
sed -e 's/\]\]>//g' |
sed -e 's/&lt;/</g' |
sed -e 's/&gt;/>/g' |
sed -e 's/<[^>]*>//g' |
cut -c 1-$maxLength |
head -$end |
sed G |
fmt


Thanks,
Kyp

tag
Sep 17, 2013, 12:17 PM
Being that I am a new mac user, and a new GT user, where would I insert the line in this script?

Putting it anywhere after the curl part would work really (I just threw it at the end). Though I ran your script and you need to replace &apos; not &apos. You forgot about the semicolon. So here is the code that will work for you...


URL="http://www.thetowntalk.com/rssfeeds/topstories.xml"
maxLength="600"
start="3"
end="9"

curl --silent "$URL" |
sed -e :a -e '$!N;s/\n//;ta' |
sed -e 's/<title>/\
<title>/g' |
sed -e 's/<\/title>/<\/title>\
/g' |
sed -e 's/<description>/\
<description>/g' |
sed -e 's/<\/description>/<\/description>\
/g' |
grep -E '(title>|description>)' |
sed -n "$start,$"'p' |
sed -e 's/<title>//' |
sed -e 's/<\/title>//' |
sed -e 's/<description>/ /' |
sed -e 's/<\/description>//' |
sed -e 's/<!\[CDATA\[//g' |
sed -e 's/\]\]>//g' |
sed -e 's/&lt;/</g' |
sed -e 's/&gt;/>/g' |
sed -e 's/<[^>]*>//g' |
cut -c 1-$maxLength |
head -$end |
sed G |
fmt |
sed "s/\&apos;/'/g"

Kyp
Sep 17, 2013, 03:35 PM
Thanks Tag, that got me fixed up....

Now if someone would tell me where I can learn more about this scripting language so that I can create my own scripts I would appreciate it.

Again, thanks.

Kyp

tag
Sep 17, 2013, 06:51 PM
Thanks Tag, that got me fixed up....

Now if someone would tell me where I can learn more about this scripting language so that I can create my own scripts I would appreciate it.

Again, thanks.

Kyp

I saw your post earlier asking about the programming language of geektool. The issue is, geektool works with nearly all programming languages. The one in your script is referred to as "Bash Shell Scripting". This is the most popular one used by geektool. You can also create Apple Scripts like the one I wrote a few posts back and execute the script through Geektool. Basically anything that you can run on the command line, you can run through geektool. So that means you can run simple unix one liners, php, ruby, and many other languages.

So for starting out I'd say Bash Scripting would be your best bet as honestly most of the geektool scripts use that. There are many tutorials and manuals online for Bash scripting, such as this (http://mywiki.wooledge.org/BashGuide) and this (http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) and this (http://www.tldp.org/LDP/Bash-Beginners-Guide/html/). (It should be noted I just googled bash scripting guides and these were some of the first).

yojitani
Sep 18, 2013, 12:00 AM
I have come across a problem with the image URL in these weather.com image retrieval codes. The /v.xxxxxxxx.xxxxxx/ part of the URL keeps changing. So I rewrote it which seems to do the trick....

curl --silent "http://www.weather.com/weather/today/[ZIPCODE or Weather.com location ID]" | grep -E '/img/wxicon/120/.*png' | head -1 | cut -f 2 -d '"' | xargs curl -o /tmp/weather.png

Thanks. I was trying out a widget recently posted on http://www.macosxtips.co.uk/geeklets/ because it has nicer icons! It doesn't work quite the way I want it to and I haven't had time to work it out. I think he's using the yahoo weather rss feed along with some already downloaded icons. Nice idea, but the weather is way off. This, however, is a nice fix! Thanks!

Kyp
Sep 18, 2013, 10:31 AM
I saw your post earlier asking about the programming language of geektool. The issue is, geektool works with nearly all programming languages. The one in your script is referred to as "Bash Shell Scripting". This is the most popular one used by geektool. You can also create Apple Scripts like the one I wrote a few posts back and execute the script through Geektool. Basically anything that you can run on the command line, you can run through geektool. So that means you can run simple unix one liners, php, ruby, and many other languages.

So for starting out I'd say Bash Scripting would be your best bet as honestly most of the geektool scripts use that. There are many tutorials and manuals online for Bash scripting, such as this (http://mywiki.wooledge.org/BashGuide) and this (http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) and this (http://www.tldp.org/LDP/Bash-Beginners-Guide/html/). (It should be noted I just googled bash scripting guides and these were some of the first).


Thanks Bro. I will be looking into Bash/Shell scripting.

Kyp
Sep 20, 2013, 12:42 PM
Guys,
I copied a script from the forum for a battery indicator.
The indicator works, but is not accurate to what is displayed in the top bar.
Geektool shows 84% where the top bad displays 89%.

Here is the script I am using, can I make an adjustment to make it display correct?max_charge=`system_profiler -detailLevel basic SPPowerDataType | grep mAh | grep Capacity | awk '{print $5 }'`
actual_charge=`system_profiler -detailLevel basic SPPowerDataType | grep mAh | grep Remaining | awk '{print $4 }'`

avail=$(echo "scale=2; $actual_charge / $max_charge * 100" | bc)

avail=`echo $avail | cut -d . -f 1`

let count=5

echo "Battery \c"

while [ $count -le $avail ]
do
if [ $count -le 25 ]
then
echo "\033[1;31m|\c" # red
colour='\033[0;31m'

elif [ $count -le 50 ]
then
echo "\033[1;33m|\c" # yellow
colour='\033[0;33m'

elif [ $count -gt 50 ]
then
echo "\033[1;32m|\c" # green
colour='\033[0;32m'
fi

let count=${count}+5
done

#echo "$colour $avail% $actual_charge(mAh) Remains"
echo $colour $avail%
echo "\033[0m"

tag
Sep 20, 2013, 01:14 PM
Guys,
I copied a script from the forum for a battery indicator.
The indicator works, but is not accurate to what is displayed in the top bar.
Geektool shows 84% where the top bad displays 89%.

Here is the script I am using, can I make an adjustment to make it display correct?

Basically that script just divides the actual charge of the battery by the maximum charge and then multiplies it by 100 to give you a percentage. That's how the OS does it as well I'd assume. At most you might see a 1% deviation between the menubar and the geektool script depending on how each system rounds, but that code shouldn't be showing a 5% difference. The variables and math also seems right on in the script, so not sure why you are seeing things not matching up.


To test it, I ran this script on my MacBook Pro, and it matched up perfectly most of the time, though for a few moments I noticed it being off by 1%, though like I said, this is a rounding issue. Hopefully someone else can chime in, because that is curious if you are getting a 5% difference with that code.

The only thing I could think of is, are you setting your geeklet to refresh often enough?

Kyp
Sep 20, 2013, 01:19 PM
The refresh rate is set to 60 seconds.
Currently Geektool = 83% while the OS indicator (what ever the top bar is called) is showing 88%.

Thanks for the reply, hope someone else can key in on the subject.

Have a good one!
Kyp

Kyp
Sep 28, 2013, 11:05 AM
Hey guys, I found a Battery meter that actually works for me with a slight mod, however. As I am new to Mac, I do not know how to combine scripts. So as I'm sitting on the recliner with a broke leg, I would like to know if someone could help me out.
The first script works, but is 5% off. The second script also works, but changed the max to 105 and is now accurate. So how could I combine the scripts to have the colored graph, with the correct %.
Thanks

Both scripts are copied and paste from this site, I take no credit for the script, that goes to the original creator....

Script-5% off
max_charge=`system_profiler -detailLevel basic SPPowerDataType | grep mAh | grep Capacity | awk '{print $5 }'`
actual_charge=`system_profiler -detailLevel basic SPPowerDataType | grep mAh | grep Remaining | awk '{print $4 }'`

avail=$(echo "scale=2; $actual_charge / $max_charge * 100" | bc)

avail=`echo $avail | cut -d . -f 1`

let count=5

echo "Battery \c"

while [ $count -le $avail ]
do
if [ $count -le 25 ]
then
echo "\033[1;31m|\c" # red
colour='\033[0;31m'

elif [ $count -le 50 ]
then
echo "\033[1;33m|\c" # yellow
colour='\033[0;33m'

elif [ $count -gt 50 ]
then
echo "\033[1;32m|\c" # green
colour='\033[0;32m'
fi

let count=${count}+5
done

#echo "$colour $avail% $actual_charge(mAh) Remains"
echo $colour $avail%
echo "\033[0m"

Script-2 changed max to 105 and is now accurate
ioreg -l | awk '$3~/Capacity/{c[$3]=$5}END{OFMT="%.0f%%";max=c["\"MaxCapacity\""];print(max>0?105*c["\"CurrentCapacity\""]/max:"?")}'



Or, could someone spoonfeed me on how to correct the first script.
Thanks,
Kyp

tag
Sep 28, 2013, 11:39 AM
Hey guys, I found a Battery meter that actually works for me with a slight mod, however. As I am new to Mac, I do not know how to combine scripts. So as I'm sitting on the recliner with a broke leg, I would like to know if someone could help me out.
The first script works, but is 5% off. The second script also works, but changed the max to 105 and is now accurate. So how could I combine the scripts to have the colored graph, with the correct %.
Thanks

Or, could someone spoonfeed me on how to correct the first script.
Thanks,
Kyp


If you just want to add +5 to the equation in the first script, adding 5 to the overall max charge on line 3 works just the same as it does in the second script...

max_charge=`system_profiler -detailLevel basic SPPowerDataType | grep mAh | grep Capacity | awk '{print $5 }'`
actual_charge=`system_profiler -detailLevel basic SPPowerDataType | grep mAh | grep Remaining | awk '{print $4 }'`

avail=$(echo "scale=2; $actual_charge / $max_charge * 100 + 5" | bc)

avail=`echo $avail | cut -d . -f 1`

let count=5

echo "Battery \c"

while [ $count -le $avail ]
do
if [ $count -le 25 ]
then
echo "\033[1;31m|\c" # red
colour='\033[0;31m'

elif [ $count -le 50 ]
then
echo "\033[1;33m|\c" # yellow
colour='\033[0;33m'

elif [ $count -gt 50 ]
then
echo "\033[1;32m|\c" # green
colour='\033[0;32m'
fi

let count=${count}+5
done

#echo "$colour $avail% $actual_charge(mAh) Remains"
echo $colour $avail%
echo "\033[0m"

I will say though that something still is off, either how your system is reporting your battery status, or maybe even something with the battery itself because it really shouldn't be off by 5 like that from what I can tell. Though if you simply want to just correct for this problem in the script, the above code should work for you.

Kyp
Sep 28, 2013, 11:46 AM
Thanks for the reply. I will fix the script for now.
But you said it may be something wrong with battery or something. Being that this MBA is less than 30 days old, should I have something looked into?

Thanks again,
Kyp

tag
Sep 28, 2013, 12:54 PM
Thanks for the reply. I will fix the script for now.
But you said it may be something wrong with battery or something. Being that this MBA is less than 30 days old, should I have something looked into?

Thanks again,
Kyp

Honestly I'm not sure. It's just a plain odd issue. The script simply calls system_profilier and asks for the battery capacity and remaining mAh values, divides them and multiplies it by 100 to give you the percentage remaining. This should be exactly the same information that your menulet gets and computes to display the information on your menubar. That is why I have no idea why you would be getting different values. Maybe the script is calling a cached value somehow, I dont know, but it shouldn't. I honestly don't know why the script is giving you a value that is 5% off.

surfbr
Sep 28, 2013, 04:20 PM
Tag, Could you please share your wallpaper? is very nice. tks

tag
Sep 28, 2013, 07:36 PM
Tag, Could you please share your wallpaper? is very nice. tks

Sure, originally it came from here (http://alexander-gg.deviantart.com/art/Digital-Blue-116318238), though I edited out the digital text in the center as I didn't care for it. Attached is my edited one...

surfbr
Sep 29, 2013, 04:54 PM
tks

b06tmm
Oct 1, 2013, 03:31 PM
Hi All,

Having an abundance of time time on my hands to pretty much do what I want, I decided to create some Geektool comic backgrounds with clear "speech bubbles" so you can insert your script.

These are set for a resolution of 1366 X 768 or thereabouts, which is what I have my Mac mini set for on my 55" Samsung 3-D LED TV.

If you would like a different resolution please let me know and I will try to create it. If you have your own comic (.cbr) that you would like me to use please let me know.

The ones I made are from some Batman comics which i just discovered yesterday. I have always been impressed with this one:

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/Spiderman_zpsbb6d53df.jpg

and have been wanting to make something like this for a while.

Here are the templates at 1366 X 768:

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/Riddler3_zpsa68d849b.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/TheJokerRetouched_zpsa4bf9f99.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/Riddler_zps6ed43514.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/Riddler2_zps8823cbd3.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/Penguin4_zpsbbfb6bc7.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/Penguin3_zpsa36f94cd.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/Penguin2_zps58f341e6.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/Penguin1_zps2eead8c3.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/NoseRing_zps8ee12e3a.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/MonkeyToy_zps6ce4c648.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/HandsUp3_zps52128ead.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/HandsUp2_zpse9cc5c2e.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/HandsUp1_zps38188b62.jpg

http://i22.photobucket.com/albums/b311/b06tmm/Geektool/BatmanandAlfred_zps7488a159.jpg

Kyp
Oct 2, 2013, 10:12 AM
Guys,
I've noticed that I have a geeklet that disappears and reappears several times a day, may be more often. What would cause this ?
Here is the script, refresh is set at 30 seconds. Also, what does a refresh rate of 0 mean?
This script was copied from the geeklet site, and I give all credit to the original author.
Anyway, Code:
#!/bin/sh
# Not my code I take no credit, I just made some small changes.
# I'm not sure who the original author is so sorry for no mention.
# Images are random images from the internet, I take no credit for those either.
# don't like the above statement, then don't use it. Simple.

SIGNAL=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/agrCtlRSSI:/ {print $2}' | sed -e 's/\-/ /'`
SSID=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk -F: '/ SSID: / {print $2}' | sed -e 's/.*SSID: //'`
CH=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/channel:/ {print $2}'`
WAN=`curl --silent http://checkip.dyndns.org | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}'`
LAN=`ifconfig en0 | grep "inet" | grep -v 127.0.0.1 | grep -v inet6 | awk '{print $2}'`
VPN=`ifconfig utun1 | grep "inet" | grep -v 127.0.0.1 | grep -v inet6 | awk '{print $2}'`
TRate=$(system_profiler SPAirPortDataType | awk '/Rate/ {print $3 " Mbps"}')

color_red=`echo "33[0;31m"`



if [ "$SSID" ] ; then
echo "SSID: $SSID"
echo "Channel: $CH$WiFi_IP "\Transmit Rate: " $TRate"
else
echo "AirPort: OFF"
fi

echo "Signal Strength:\t\c"

if [ ${#SIGNAL} = 0 ]
then
echo "Disconnected\c"
else

if [ $SIGNAL -lt 11 ]
then
echo "\033[1;31m\c"
else
echo "\033[0m\c"
fi

while [ $b -le $SIGNAL ]
do
echo "|\c"
b=`expr $b + 5`
done

while [ $b -le 100 ]
do
echo "\033[1;37m|\033[0m\c"
b=`expr $b + 5`
done

echo "\033[0m $SIGNAL%\c"

unset SIGNAL
unset b

fi


if [ "$LAN" ] ; then
echo "\nLAN IP Address: $LAN"
else
echo "LAN IP Address: NO CONNECTION"
fi

if [ "$WAN" ] ; then
echo "EXT IP Address: $WAN"
else
echo "EXT IP Address: NO INTERNET CONNECTION"
fi

tag
Oct 3, 2013, 11:02 AM
refresh is set at 30 seconds.
You may want to seperate out the part where it checks the dydns.org website for your external IP and have that separate with a longer refresh time in it's own separate geeklet. Dyn asks that requests are 10 minutes apart (http://dyn.com/support/developers/checkip-tool/) at least. I don't know what happens if you request that page say, every 30 seconds for hours on end, it may temporarily ban your IP or do nothing, I'm not sure off hand as they don't implicitly say on their site.

Could this be your issue though? If dyndns temporarily blacklists your IP from checking for your IP address on that site because of overuse, it may be holding up your script, until which time you become unblacklisted and then your script works again? Just a thought, you could check this out by commenting out the "WAN=" variable line for a day and see if it solves your problem.

Also, what does a refresh rate of 0 mean?
A refresh rate of 0 means it will load once, then not update again.

Kyp
Oct 4, 2013, 07:50 AM
Thanks Tag,
The WAN curl seemed to be the issue, as it is the only one that is disappearing now. I set the refresh rate to numerous times ranging from 3 hours, to 6 hours and it still disappears. Anyway, thanks for the info.
I have posted in another location a question about an apple script.
If you could, look at it and see if this is something that you can answer.
Here is the link, (I don't like to double post). http://forums.macrumors.com/showthread.php?p=18055673#post18055673
Thanks,
Kyp

HarshReality
Oct 12, 2013, 02:05 PM
Today I downloaded an app called Hermes (http://alexcrichton.com/hermes/) which is a standalone Pandora Radio client (which seems pretty decent, and also can apparently bypass the skip limit somehow which is nice). It seems that no one has written any geektool scripts to display song info, so I wrote up my own.



on run
tell application "System Events"
set num to count (every process whose name is "Hermes")
end tell
if num > 0 then
tell application "Hermes"
get playback state
set stationname to the current station's name
set titlename to the current song's title
set artistname to the current song's artist
set albumname to the current song's album
set albumart to current song's art
if playback state is not paused then
set info to "Streaming: Pandora Radio" & " -- Station: " & stationname & " -- Artist: " & artistname & " -- Title: " & titlename & " -- Album: " & albumname
else
set info to "Pandora Radio is Paused"
end if
end tell
end if
return info
end run


If you would prefer the info to be stacked instead of in a straight line, replace line 14 with the following...

set info to "Streaming: Pandora Radio" & "\n Station: " & stationname & "\n Artist: " & artistname & "\n Title: " & titlename & "\n Album: " & albumname

Save the file as whatever (I used Hermes.scpt), and in Geektool set as a shell command, and use the following command (change directory as needed)...

osascript /Users/USER/WHEREVER/Hermes.scpt

Just thought I'd share in case anyone else uses this app.
[screenshot attached]

Could you by chance hang your scripts for the horizontal at the top... I love the layout and color scheme..

tag
Oct 13, 2013, 12:59 AM
Could you by chance hang your scripts for the horizontal at the top... I love the layout and color scheme..

I assume you mean the bar which shows CPU, memory, net transfer, etc... That is actually an app called XRG (http://www.gauchosoft.com/Products/XRG/), not geektool.

Since you liked the color scheme, I saved and attached my XRG theme file for you.

mikepj
Oct 18, 2013, 06:57 PM
I assume you mean the bar which shows CPU, memory, net transfer, etc... That is actually an app called XRG (http://www.gauchosoft.com/Products/XRG/), not geektool.

Since you liked the color scheme, I saved and attached my XRG theme file for you.

Awesome screenshot! Looks like you spent a ton of time getting everything to look so slick. Glad to see XRG fits in so well with the color scheme too. Thanks for linking to the app and sharing your theme file…

Mike
(the developer of XRG)

d0hutch
Oct 23, 2013, 10:17 AM
anyone having issues with /tmp/weather.png in the shell script with Mavericks? Mine has stopped working and I think its a path issue.

bhtwo
Oct 23, 2013, 10:55 AM
The image path hasn't been working for a while now.

beks6
Oct 23, 2013, 12:24 PM
My new Desktop after upgrading to Mavericks

442705

vomhorizon
Oct 25, 2013, 02:46 PM
My first attempt.. IOS 7 theme with a inspirational quote from the man himself...Still very much a work in progress...I'll work on the icons next using this to get a more authentic ios7 expereince..

http://iynque.deviantart.com/art/iOS-7-Icons-Updated-378969049

http://img545.imageshack.us/img545/4945/0xdg.png

Edit:

version 2.0.0

http://img802.imageshack.us/img802/8785/ej0z.png

fhall1
Oct 26, 2013, 05:29 PM
My first attempt.. IOS 7 theme with a inspirational quote from the man himself...Still very much a work in progress...I'll work on the icons next using this to get a more authentic ios7 expereince..

http://iynque.deviantart.com/art/iOS-7-Icons-Updated-378969049

Image (http://img545.imageshack.us/img545/4945/0xdg.png)

Edit:

version 2.0.0

Image (http://img802.imageshack.us/img802/8785/ej0z.png)

Note how your calendar days are all screwed up....you need a monospace font.

MidnightBreak
Oct 28, 2013, 10:24 AM
Hi Everyone, this is my first attempt at using geek tool. I essentially used the theme from http://existencerocks.wordpress.com/2009/08/22/am-i-a-geek-now/
and made it my own. Scripts are from a bunch of different places (I am not capable of writing my own). The calendar events were done with icalbuddy.

Also thanks to whoever mentioned that you need to use a fixed width font for the month calendar. I was wondering why my dates didn't look right.


The second is a doctor who themed background. Image from http://www.wallpapername.com/Fictional_characters/TARDIS/tardis_typography_doctor_who_time_blink_1920x1200_wallpaper_46654

itsme932
Oct 30, 2013, 10:46 PM
Ever since I've updated to Mavericks, my icalbuddy Geeklet has stopped working. I actually believe icalbuddy is responsible as my logs show it is constantly crashing. Anyone else have any experience with this or know how to get it back?

Edit: It has been fixed. Sorry!

DMoggo
Oct 31, 2013, 02:54 PM
Does anyone know what font is used for the time and date on the lock screen of ios 7 devices?

Want to get the ios look on my macbook :)

Many thanks.

bhtwo
Oct 31, 2013, 03:37 PM
It's Apple's own version of Helvetica Neue Ultra Light (or Ultralight)

MyMac1976
Oct 31, 2013, 03:52 PM
How about conky?

kay.87
Nov 5, 2013, 11:47 AM
Hi,everybody help me get date from reminders? This script work normal on Mountain lion but on Maverick work only on applescript,nothing show on geektool :( Thanks.

k-profiler
Nov 6, 2013, 12:23 PM
New guy here.:)

http://fc02.deviantart.net/fs71/f/2013/309/5/f/november_5_by_k_profiler-d6t66tk.png (http://k-profiler.deviantart.com/art/November-5-411794696)

Low on GeekTool, but high on other customizations.:D

PS. I'd give anything for a Mac port of Rainmeter, as the only thing I miss on Windows is clickable RSS links on my desktop. Anyone wouldn't happen to know a solution?

jlluna
Nov 7, 2013, 10:27 AM
How did you change your desktop bar icons?

Lostanddamned
Nov 7, 2013, 07:34 PM
Having looked in this thread and seen that I made the third post, I decided to update it with my newest desktop.

Same colours, changed my browser and chat tool, reminders has come into play and I'm no longer able to make Twitter dockless, which is frustrating. I also moved to a lighter version of the same font, which makes everything a little more easy on the eye.

I also added in the rough-time clock, which shows the approximate time, as it would be referred in conversation. Its all on a new machine now, a 2012 13" retina running at 1440*900 scale.

MidnightBreak
Nov 27, 2013, 11:10 AM
New winter desktop :)
Wallpaper is from http://last-savior.deviantart.com/art/Winter-Fall-Wallpaper-138525774

z06gal
Dec 6, 2013, 05:01 PM
Here is mine. I just wish I could get a working weather icon ;)

http://img43.imageshack.us/img43/918/7jwh.png

SomeGuyDude
Dec 6, 2013, 11:26 PM
How about conky?

Dude, I miss Arch+Conky so much. That was an amazing setup.

http://i.imgur.com/nuZCql.jpg (http://i.imgur.com/nuZCq.jpg)

MyMac1976
Dec 7, 2013, 04:15 AM
Dude, I miss Arch+Conky so much. That was an amazing setup.

Image (http://i.imgur.com/nuZCq.jpg)

I'm a big fan of Arch I've used Linux on and off for years now but Arch turned the tide it's why I'll be leaving the Apple ecosystem.

SomeGuyDude
Dec 7, 2013, 10:25 AM
I'm a big fan of Arch I've used Linux on and off for years now but Arch turned the tide it's why I'll be leaving the Apple ecosystem.

My only problem with Arch: it eats battery somehow. On my one laptop with Win7, battery lasted 4-5 hours. Arch got maybe 2 if I was lucky. Even with all the various tools to ratchet down cpu usage and power management it still ate through battery like mad.

MyMac1976
Dec 7, 2013, 10:41 AM
My only problem with Arch: it eats battery somehow. On my one laptop with Win7, battery lasted 4-5 hours. Arch got maybe 2 if I was lucky. Even with all the various tools to ratchet down cpu usage and power management it still ate through battery like mad.

I get about 6 setting up laptop-mode-tools and cpu-power

Pendragon55
Dec 12, 2013, 03:45 PM
Been lurching around this forum for ages and learnt a lot from all those who posted theirs up. This is mine currently to match the os7 minimalistic style.

http://farm4.staticflickr.com/3766/11343957684_0d47bcc40f.jpg (http://www.flickr.com/photos/devilsam55/11343957684/)

vandoorn
Dec 13, 2013, 04:53 PM
Been lurching around this forum for ages and learnt a lot from all those who posted theirs up. This is mine currently to match the os7 minimalistic style.

Image (http://www.flickr.com/photos/devilsam55/11343957684/)

Wow looks great! I've been hesitating to change all my icons to text icons. But yours just looks stunning! Maybe i will do some tests in the weekend! :)

allan.nyholm
Dec 17, 2013, 05:40 PM
I assume you mean the bar which shows CPU, memory, net transfer, etc... That is actually an app called XRG (http://www.gauchosoft.com/Products/XRG/), not geektool.

Since you liked the color scheme, I saved and attached my XRG theme file for you.

I'm thankful for you posting a link to this. I've never heard of this app.

I've not read the whole thread - I just took the last page here and went backwards through the thread.

Huge thanks to mikepj for making the app.

MyMac1976
Dec 18, 2013, 05:09 AM
Been lurching around this forum for ages and learnt a lot from all those who posted theirs up. This is mine currently to match the os7 minimalistic style.

Image (http://www.flickr.com/photos/devilsam55/11343957684/)

I tried this too but I couldn't get used to it but it looks awesome

kay.87
Dec 27, 2013, 05:42 PM
Hi,everybody help me get date from reminders? This script work normal on Mountain lion but on Maverick work only on applescript,nothing show on geektool :( Thanks. anybody help me? :(

moutian
Dec 27, 2013, 11:55 PM
I wish I could make use of the trash bin in the wallpaper...

toofewbullets
Dec 30, 2013, 11:50 PM
http://farm6.staticflickr.com/5536/11670264454_1274889e7e_o.png

bluespider
Dec 31, 2013, 12:02 PM
Image (http://farm6.staticflickr.com/5536/11670264454_1274889e7e_o.png)

Love the font, works great with your theme

laurenashley
Dec 31, 2013, 07:02 PM
Love Helvetica and stars so this is what I did!

MyMac1976
Jan 1, 2014, 07:51 PM
..

andreaslarsen
Jan 12, 2014, 07:45 AM
Only used geektool for the time+date and to cancel out the menu bar shadow

fhall1
Jan 13, 2014, 06:14 AM
I wish I could make use of the trash bin in the wallpaper...

Is there a way to make a desktop icon transparent? Then just make a large recycle bin icon (approximate the size of the bin in the picture), move it over the bin in your desktop background and make it transparent.

d-emolat
Feb 17, 2014, 12:05 PM
Mine.
http://fc09.deviantart.net/fs70/f/2014/048/b/e/themed_os_x_with_geektool_by_jpxyz-d76vhok.png

TenneyThe2nd
Feb 20, 2014, 09:53 AM
http://marktenney.me/_wp2/wp-content/uploads/2014/02/Screenshot-2014-02-20-10.48.08.png

gr4z
Mar 4, 2014, 10:08 AM
Here's my latest

BIGJM
Mar 19, 2014, 02:49 PM
Hi mates: After working two weeks finally I set up new scrips working with the nice yahoo icons.

1. Open geek tools

2. WEATHER IMAGE SCRIPT (image)
file://localhost/tmp/weatherYfr.png

Refresh every 30 seconds


3. go to www.fr.meteo.yahoo.com set your city (for me is Barcelona, Spain) and copy your url:

http://fr.meteo.yahoo.com/espagne/catalogne/barcelone-753692

4. IMAGE GRAB SCRIPT (Shell)

curl --silent "http://fr.meteo.yahoo.com/espagne/catalogne/barcelone-753692" | grep "url('http://l.yimg.com/os/mit/media/m/weather/images/icons/l/"| sed -e "s/\yom-mod yom-weather.*obs-current-weather//" | sed -e "s/\-100567.png.*//" | sed -e "s/[0-9][0-9][a-z]/&-100567.png/" | sed -e "s/\<div.*http/http/" | xargs curl --silent -o /tmp/weatherYfr.png\

Refresh every 30 seconds


Works fine for me in Mavericks.

LOL. BIG_JM:D:D

miK.
Mar 19, 2014, 08:41 PM
Here's my latest

Very interested in how you got that cloud icon to work?
Just saw Big JM's post but have not tried to do that yet...

BIGJM
Mar 20, 2014, 01:16 PM
Very interested in how you got that cloud icon to work?
Just saw Big JM's post but have not tried to do that yet...

I'm working with google chrome with "tools" and looking in "view source" and searching where de image icon is save.

:p:p:p (hard work) :D

BIG_JM

miK.
Mar 21, 2014, 11:00 AM
Hi mates: After working two weeks finally I set up new scrips working with the nice yahoo icons.

Thanks BIGJM -- I got it to work!

FreemanW
Mar 21, 2014, 08:49 PM
It was a nice run while it lasted . . . . .

Yahoo has changed their page construct and no longer has a dominant weather icon . . . . . . as you may see here:
http://weather.yahoo.com/united-states/california/san-francisco-2487956/

. . . . or here . . . . . http://weather.yahoo.com/united-states/california/los-angeles-2442047/

I do not have a clue where a suitable alternative might be found, much less where to begin coding a new script for grabbing the image. :rolleyes:

miK.
Mar 21, 2014, 10:13 PM
It was a nice run while it lasted . . . . .
I do not have a clue where a suitable alternative might be found, much less where to begin coding a new script for grabbing the image. :rolleyes:

Go up and read BIGJM's post #320. Yahoo's French weather site (http://fr.meteo.yahoo.com/) still uses the icons and they can be
"scraped" from there. Enter your zip/city info and copy the address from there.
I just did it today and it works great!

FreemanW
Mar 22, 2014, 02:34 AM
Go up and read BIGJM's post #320. Yahoo's French weather site (http://fr.meteo.yahoo.com/) still uses the icons and they can be
"scraped" from there. Enter your zip/city info and copy the address from there.
I just did it today and it works great!

Thank you! Your encouragement (. . . and BIGJM's excellent work) means I now have the weather icon on my desktop.

BIGJM
Mar 22, 2014, 07:15 AM
Hi mates: After working two weeks finally I set up new scrips working with the nice yahoo icons.

1. Open geek tools

2. WEATHER IMAGE SCRIPT (image)
file://localhost/tmp/weatherYfr.png

Refresh every 30 seconds


3. go to www.fr.meteo.yahoo.com set your city (for me is Barcelona, Spain) and copy your url:

http://fr.meteo.yahoo.com/espagne/catalogne/barcelone-753692

4. IMAGE GRAB SCRIPT (Shell)

curl --silent "http://fr.meteo.yahoo.com/espagne/catalogne/barcelone-753692" | grep "url('http://l.yimg.com/os/mit/media/m/weather/images/icons/l/"| sed -e "s/\yom-mod yom-weather.*obs-current-weather//" | sed -e "s/\-100567.png.*//" | sed -e "s/[0-9][0-9][a-z]/&-100567.png/" | sed -e "s/\<div.*http/http/" | xargs curl --silent -o /tmp/weatherYfr.png\

Refresh every 30 seconds


Works fine for me in Mavericks.

LOL. BIG_JM:D:D

At the end the mine.

BIGJM :p :p

FreemanW
Mar 22, 2014, 01:26 PM
Once again, thank you BIGJM!

Here's mine . . . .

fhall1
Mar 23, 2014, 07:42 AM
Makes me wonder how long the French Yahoo site will keep posting icons....

FreemanW
Mar 23, 2014, 01:44 PM
Yes, I would expect those days are numbered.

firedept
Mar 23, 2014, 05:20 PM
Just started to use Geektool. So here is my first kick at it.

Mark72501
Mar 23, 2014, 06:23 PM
Just started to use Geektool. So here is my first kick at it.

Would you or someone else who has one care to share your monthly calendar (like in the lower right corner on your screen) with the current day highlighted? I realize that is probably one of the simplest to have but for some reason I tried one I found awhile back and couldn't get it to work right for me.

It would be greatly appreciated...!

FreemanW
Mar 23, 2014, 06:35 PM
Would you or someone else who has one care to share your monthly calendar (like in the lower right corner on your screen) with the current day highlighted? I realize that is probably one of the simplest to have but for some reason I tried one I found awhile back and couldn't get it to work right for me.

It would be greatly appreciated...!

Hey Mark, here's a link for one solution:
http://computers.tutsplus.com/tutorials/use-geektool-to-add-your-calendar-to-your-desktop--mac-48205

One small detail I had a very difficult time finding out . . . . you will want to make sure when choosing the font, Fixed Width . . . . make sure you go with a fixed width font or your day date columns will not line up correctly.

Mark72501
Mar 23, 2014, 06:41 PM
Hey Mark, here's a link for one solution:
http://computers.tutsplus.com/tutorials/use-geektool-to-add-your-calendar-to-your-desktop--mac-48205

One small detail I had a very difficult time finding out . . . . you will want to make sure when choosing the font, Fixed Width . . . . make sure you go with a fixed width font or your day date columns will not line up correctly.

Oh cool, thank you - that one is much easier to follow than what I found before.

firedept
Mar 23, 2014, 08:10 PM
Oh cool, thank you - that one is much easier to follow than what I found before.

The calendar link is what I used as well. The font I am using for mine is Andale Mono if this helps you at all.

i808
Mar 24, 2014, 06:09 AM
curl --silent "http://fr.meteo.yahoo.com/espagne/catalogne/barcelone-753692" | grep "url('http://l.yimg.com/os/mit/media/m/weather/images/icons/l/"| sed -e "s/\yom-mod yom-weather.*obs-current-weather//" | sed -e "s/\-100567.png.*//" | sed -e "s/[0-9][0-9][a-z]/&-100567.png/" | sed -e "s/\<div.*http/http/" | xargs curl --silent -o /tmp/weatherYfr.png\


can confirm www.fr.meteo.yahoo.com still working for me... thanks for the script BIGJM

Can anyone recommend a fixed width font for my calendar geeklet that will go with the rest of this?

FreemanW
Mar 24, 2014, 03:09 PM
can confirm www.fr.meteo.yahoo.com still working for me... thanks for the script BIGJM

Can anyone recommend a fixed width font for my calendar geeklet that will go with the rest of this?

I've searched the tubes of the Googles, so far, the one I've come up with, already resided on my hdd, the one that most closely goes with Helvetica Nueu UltraLight is "Letter Gothic Std" Medium. (which (it would appear) you're already using) YMMV

FreemanW
Mar 30, 2014, 04:17 PM
I can only guess that it bothers Yahoo that people are poaching their weather icon from their web and using it on the desktop. They've (once again) changed the URL where the current weather icon is located:

https://s.yimg.com/os/mit/media/m/weather/images/icons/l/28d-100567.png

I did attempt to make the proper change to the curl statement in GeekTool, but I must be punching over my weight class as my change did not produce a working desktop manifestation.

Arggghhh.

jbyun04
Mar 30, 2014, 06:30 PM
Thanks BIGJM -- I got it to work!

whoa could i get a link to the wallpaper pleaseeee!! :eek::eek:

miK.
Mar 30, 2014, 07:56 PM
whoa could i get a link to the wallpaper pleaseeee!! :eek::eek:

Here's the wallpaper: Ghost Nebula (https://dl.dropboxusercontent.com/u/870242/the_ghost_nebula.jpg)
Also if you google image "ghost nebula" you'll find other sizes/variations.

Have switched to this other nebula (https://dl.dropboxusercontent.com/u/870242/dark_nebula.png) now. :)
More sizes here (http://jonnypc12.deviantart.com/#/art/Nebula-434531466?hf=1).

FreemanW
Mar 30, 2014, 10:31 PM
. . . . . uh, turns out Yahoo modified the URL for the location from http to https Making the change in the curl statement provided resolution.

BIGJM
Apr 3, 2014, 12:53 PM
. . . . . uh, turns out Yahoo modified the URL for the location from http to https Making the change in the curl statement provided resolution.

Hi:
I found the "temporary" solution here:

http://zoooot.com/2002/yahoo-weather-icon-geektool-update

so i the image grab now is something like this
file://localhost/tmp/currentweather.png

and the shell for get the image
curl -s -o /tmp/weather.html https://es.tiempo.yahoo.com/españa/cataluña/barcelona-753692/; curl -s -o /tmp/currentweather.png `grep "div\ class=\"current-weather\"\ id=\"obs-current-weather\"\ style=\"background:url" /tmp/weather.html | awk -F"'" '{ printf $4 }'`

Bye.
BIGJM

gr4z
Apr 3, 2014, 01:54 PM
If anyone is interested this is the script I use for my weather, its a collection of stuff I have found lying around (just change your yahoo location code):

property white_space : {space, tab, return, (ASCII character 10), (ASCII character 13)}
on run
set pathName to "/Users/xxx/Documents/Settings/WeatherIcon"
set weatherFile to pathName & "/WeatherIcon.txt"
set weatherLocation to "xxxxxx"
set tempType to "c" -- "f" for Fahrenheit and "c" for Celsius … must be lowercase

set newline to "\\\\n"
set degreesF to "F"
set degreesC to "C"
set degrees to ""

if tempType is equal to "f" then
set degrees to degreesF
else if tempType is equal to "c" then
set degrees to degreesC
end if

set weatherCurl to (do shell script "curl --silent 'http://xml.weather.yahoo.com/forecastrss/" & weatherLocation & "_" & tempType & ".xml' | grep 'yweather:' >" & weatherFile)

--set weatherCurl to (do shell script "curl --silent 'http://weather.yahooapis.com/forecastrss?p=" & weatherLocation & "&u=f' | grep 'yweather:' >" & weatherFile)

set forecast1Day to "Today"

set forecast2Day to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==2{print;exit}' | sed -e 's/.*day=//;s/date=.*//' | sed 's/\"//g'") as string
set forecast2Day to (my trim_string(forecast2Day, white_space, "both"))

set forecast3Day to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==3{print;exit}' | sed -e 's/.*day=//;s/date=.*//' | sed 's/\"//g'") as string
set forecast3Day to (my trim_string(forecast3Day, white_space, "both"))

set forecast1Conditions to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==1{print;exit}' | sed -e 's/.*text=//;s/code=.*//' | sed 's/\"//g'") as string
set forecast1Conditions to (my trim_string(forecast1Conditions, white_space, "both"))

set forecast2Conditions to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==2{print;exit}' | sed -e 's/.*text=//;s/code=.*//' | sed 's/\"//g'") as string
set forecast2Conditions to (my trim_string(forecast2Conditions, white_space, "both"))

set forecast3Conditions to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==3{print;exit}' | sed -e 's/.*text=//;s/code=.*//' | sed 's/\"//g'") as string
set forecast3Conditions to (my trim_string(forecast3Conditions, white_space, "both"))

set forecast1High to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==1{print;exit}' | sed -e 's/.*high=//;s/text=.*//' | sed 's/\"//g'") as string
set forecast1High to (my trim_string(forecast1High, white_space, "both"))

set forecast2High to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==2{print;exit}' | sed -e 's/.*high=//;s/text=.*//' | sed 's/\"//g'") as string
set forecast2High to (my trim_string(forecast2High, white_space, "both"))

set forecast3High to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==3{print;exit}' | sed -e 's/.*high=//;s/text=.*//' | sed 's/\"//g'") as string
set forecast3High to (my trim_string(forecast3High, white_space, "both"))

set forecast1Low to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==1{print;exit}' | sed -e 's/.*low=//;s/high=.*//' | sed 's/\"//g'") as string
set forecast1Low to (my trim_string(forecast1Low, white_space, "both"))

set forecast2Low to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==2{print;exit}' | sed -e 's/.*low=//;s/high=.*//' | sed 's/\"//g'") as string
set forecast2Low to (my trim_string(forecast2Low, white_space, "both"))

set forecast3Low to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==3{print;exit}' | sed -e 's/.*low=//;s/high=.*//' | sed 's/\"//g'") as string
set forecast3Low to (my trim_string(forecast3Low, white_space, "both"))

--set forecastDay1 to forecast1Day & ": " & forecast1Conditions & ", " & forecast1High & degrees & " Low: " & forecast1Low & degrees
--set forecastDay2 to forecast2Day & ": " & forecast2Conditions & ", " & forecast2High & degrees & " Low: " & forecast2Low & degrees
--set forecastDay3 to forecast3Day & ": " & forecast3Conditions & ", " & forecast3High & degrees & " Low: " & forecast3Low & degrees

set forecastDay1 to forecast1Day & ": " & forecast1Conditions & ", " & forecast1High & degrees
set forecastDay2 to forecast2Day & ": " & forecast2Conditions & ", " & forecast2High & degrees
set forecastDay3 to forecast3Day & ": " & forecast3Conditions & ", " & forecast3High & degrees

set distance to (do shell script "grep -E 'yweather:units' " & weatherFile & "| sed -e 's/.*distance=//;s/pressure=.*//' | sed 's/\"//g'") as string
set distance to (my trim_string(distance, white_space, "both"))

set speed to (do shell script "grep -E 'yweather:units' " & weatherFile & "| sed -e 's/.*speed=//;s/\\/>.*//' | sed 's/\"//g'") as string
set speed to (my trim_string(speed, white_space, "both"))

set weatherCondition to (do shell script "grep -E 'yweather:condition' " & weatherFile & "| sed -e 's/.*text=//;s/code=.*//' | sed 's/\"//g'") as string
set weatherCondition to (my trim_string(weatherCondition, white_space, "both"))

set weatherTemp to (do shell script "grep -E 'yweather:condition' " & weatherFile & "| sed -e 's/.*temp=//;s/date=.*//' | sed 's/\"//g'") as string
set weatherTemp to (my trim_string(weatherTemp, white_space, "both"))

set weatherCondition to weatherCondition & ", " & weatherTemp & degrees

set weatherWindChill to (do shell script "grep -E 'yweather:wind' " & weatherFile & "| sed -e 's/.*chill=//;s/direction=.*//' | sed 's/\"//g'") as string
set weatherWindChill to (my trim_string(weatherWindChill, white_space, "both"))

set weatherWindDirection to (do shell script "grep -E 'yweather:wind' " & weatherFile & "| sed -e 's/.*direction=//;s/speed=.*//' | sed 's/\"//g'") as string
set weatherWindDirection to (my trim_string(weatherWindDirection, white_space, "both"))
set weatherWindDirection to (my windDirection(weatherWindDirection))

set weatherWindSpeed to (do shell script "grep -E 'yweather:wind' " & weatherFile & "| sed -e 's/.*speed=//;s/\\/>.*//' | sed 's/\"//g'") as string
set weatherWindSpeed to (my trim_string(weatherWindSpeed, white_space, "both"))

set weatherWindChillSpeed to "Wind: " & weatherWindSpeed & " " & speed & " Direction: " & weatherWindDirection

set weatherSunrise to (do shell script "grep -E 'yweather:astronomy' " & weatherFile & "| sed -e 's/.*sunrise=//;s/sunset=.*//' | sed 's/\"//g'") as string
set weatherSunrise to (my trim_string(weatherSunrise, white_space, "both"))

set weatherSunset to (do shell script "grep -E 'yweather:astronomy' " & weatherFile & "| sed -e 's/.*sunset=//;s/\\/>.*//' | sed 's/\"//g'") as string
set weatherSunset to (my trim_string(weatherSunset, white_space, "both"))

set weatherSunrise24 to (h12toh24(weatherSunrise, ":"))
set weatherSunset24 to (h12toh24(weatherSunset, ":"))

set weatherSunRiseSet to "Sunrise: " & weatherSunrise24 & " Sunset: " & weatherSunset24

set weatherIcon to (do shell script "grep -E 'yweather:condition' " & weatherFile & "| sed -e 's/.*code=//;s/temp=.*//' | sed 's/\"//g'") as string
set weatherIcon to (my trim_string(weatherIcon, white_space, "both"))

do shell script ("cp " & pathName & "/png/" & weatherIcon & ".png " & pathName & "/WeatherIcon.png")

do shell script ("echo " & forecastDay1 & newline & forecastDay2 & newline & forecastDay3 & newline & weatherWindChillSpeed & newline & weatherSunRiseSet)
-- do shell script ("echo " & forecastDay1 & newline & forecastDay2 & newline & weatherWindChillSpeed & newline & weatherSunRiseSet & newline)

end run

on h12toh24(input, separator)
set t to words of text 1 thru -3 of input
if (text -2 thru -1 of input is "pm") then set item 1 of t to (item 1 of t) + 12
repeat 3 - (count t) times
set end of t to 0
end repeat
tell (1000000 + (item 1 of t) * 10000 + (item 2 of t) * 100 + (item 3 of t)) as text
return text 2 thru 3 & separator & text 4 thru 5
end tell
end h12toh24

on trim_string(the_string, trim_chars, trim_parameter)
set start_char to 1
set end_char to length of the_string
set all_chars to (characters of the_string)

if trim_parameter is in {"left", "both"} then
repeat with each_char in all_chars
if each_char is not in trim_chars then exit repeat
set start_char to (start_char + 1)
end repeat
end if

if trim_parameter is in {"right", "both"} then
set all_chars to reverse of all_chars
repeat with each_char in all_chars
if each_char is not in trim_chars then exit repeat
set end_char to (end_char - 1)
end repeat
end if

try
return text start_char thru end_char of the_string
on error
return ""
end try
end trim_string

on windDirection(theDegrees)

set degrees to theDegrees as number

if (degrees ≥ 0 and degrees ≤ 11.25) then
return "N"
end if
if degrees > 11.25 and degrees ≤ 33.75 then
return "NNE"
end if
if (degrees > 33.75 and degrees ≤ 56.25) then
return "NE"
end if
if (degrees > 56.25 and degrees ≤ 78.75) then
return "ENE"
end if
if (degrees > 78.75 and degrees ≤ 101.25) then
return "E"
end if
if (degrees > 101.25 and degrees ≤ 123.75) then
return "ESE"
end if
if (degrees > 123.75 and degrees ≤ 146.25) then
return "SE"
end if
if (degrees > 146.25 and degrees ≤ 168.75) then
return "SSE"
end if
if (degrees > 168.75 and degrees ≤ 191.25) then
return "S"
end if
if (degrees > 191.25 and degrees ≤ 213.75) then
return "SSW"
end if
if (degrees > 213.75 and degrees ≤ 236.25) then
return "SW"
end if
if (degrees > 236.25 and degrees ≤ 258.75) then
return "WSW"
end if
if (degrees > 258.75 and degrees ≤ 281.25) then
return "W"
end if
if (degrees > 281.25 and degrees ≤ 303.75) then
return "WNW"
end if
if (degrees > 303.75 and degrees ≤ 326.25) then
return "NW"
end if
if (degrees > 326.25 and degrees ≤ 348.75) then
return "NNW"
end if
if (degrees > 348.75 and degrees ≤ 360) then
return "N"
end if

return ""

end windDirection

I then have a collection of 47 PNGs for the weather icons downloaded from the web in the folder /Users/xxxx/Documents/Settings/WeatherIcon/png. Run the script via Geektool/Nerdtool.

I then point to the created PNG In the folder Users/xxx/Documents/Settings/WeatherIcon for the current weather icon.

HTH

miK.
Apr 3, 2014, 05:38 PM
Does anyone know of a set or place to get the NEW yahoo icons at a larger size?
I kind of like the flat style and think it would look pretty neat on the desktop.

Thanks!

https://dl.dropboxusercontent.com/u/870242/Screen%20shot%202014-04-03%20at%206.34.24%20PM.png

quyleanh
Apr 11, 2014, 12:20 PM
Been lurching around this forum for ages and learnt a lot from all those who posted theirs up. This is mine currently to match the os7 minimalistic style.

Image (http://www.flickr.com/photos/devilsam55/11343957684/)

Only used geektool for the time+date and to cancel out the menu bar shadow

please share it.... thanks so much.

Kornelis
Apr 13, 2014, 10:45 AM
This is my desktop. I'll admit it's a bit full on my 11 inch Macbook Air screen, but I like it. I'm still working on the AppleScript program, but for the most part it works. The program gets the current GPS location from the Location Services of my MacBook, if it's connected to the Internet through Wi-FI. Then it uses these coordinates to get the WOEID (Where On Earth Identifier) from Yahoo. With this WOEID the program retrieves the Yahoo weather information for that place.

You can get the GPS location from Core Location of the Mac with the help of a program from Mousedown:
http://www.mousedown.net/mouseware/LocationHelper.html

Ronan1888
Apr 14, 2014, 07:25 AM
Hi there

I was wondering if anyone could help me with getting a geeklet set up which limits geektool's memory usage. Geektool for me increases higher and higher in memory as time goes on.

I've tried this: http://www.macosxtips.co.uk/geeklets/system/auto-memory-monitor-for-geektool/

But it doesn't seem to be working for me. Any help guys?

yetiboy
Apr 14, 2014, 09:13 AM
Hey gr4z, I'm interested in playing around with your script, just a quick question: How do you have your images named in the folder? Are they numbered 1-47 (eg. 1.png, 2.png, etc.)?

If anyone is interested this is the script I use for my weather, its a collection of stuff I have found lying around (just change your yahoo location code):

property white_space : {space, tab, return, (ASCII character 10), (ASCII character 13)}
on run
set pathName to "/Users/xxx/Documents/Settings/WeatherIcon"
set weatherFile to pathName & "/WeatherIcon.txt"
set weatherLocation to "xxxxxx"
set tempType to "c" -- "f" for Fahrenheit and "c" for Celsius … must be lowercase

set newline to "\\\\n"
set degreesF to "F"
set degreesC to "C"
set degrees to ""

if tempType is equal to "f" then
set degrees to degreesF
else if tempType is equal to "c" then
set degrees to degreesC
end if

set weatherCurl to (do shell script "curl --silent 'http://xml.weather.yahoo.com/forecastrss/" & weatherLocation & "_" & tempType & ".xml' | grep 'yweather:' >" & weatherFile)

--set weatherCurl to (do shell script "curl --silent 'http://weather.yahooapis.com/forecastrss?p=" & weatherLocation & "&u=f' | grep 'yweather:' >" & weatherFile)

set forecast1Day to "Today"

set forecast2Day to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==2{print;exit}' | sed -e 's/.*day=//;s/date=.*//' | sed 's/\"//g'") as string
set forecast2Day to (my trim_string(forecast2Day, white_space, "both"))

set forecast3Day to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==3{print;exit}' | sed -e 's/.*day=//;s/date=.*//' | sed 's/\"//g'") as string
set forecast3Day to (my trim_string(forecast3Day, white_space, "both"))

set forecast1Conditions to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==1{print;exit}' | sed -e 's/.*text=//;s/code=.*//' | sed 's/\"//g'") as string
set forecast1Conditions to (my trim_string(forecast1Conditions, white_space, "both"))

set forecast2Conditions to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==2{print;exit}' | sed -e 's/.*text=//;s/code=.*//' | sed 's/\"//g'") as string
set forecast2Conditions to (my trim_string(forecast2Conditions, white_space, "both"))

set forecast3Conditions to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==3{print;exit}' | sed -e 's/.*text=//;s/code=.*//' | sed 's/\"//g'") as string
set forecast3Conditions to (my trim_string(forecast3Conditions, white_space, "both"))

set forecast1High to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==1{print;exit}' | sed -e 's/.*high=//;s/text=.*//' | sed 's/\"//g'") as string
set forecast1High to (my trim_string(forecast1High, white_space, "both"))

set forecast2High to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==2{print;exit}' | sed -e 's/.*high=//;s/text=.*//' | sed 's/\"//g'") as string
set forecast2High to (my trim_string(forecast2High, white_space, "both"))

set forecast3High to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==3{print;exit}' | sed -e 's/.*high=//;s/text=.*//' | sed 's/\"//g'") as string
set forecast3High to (my trim_string(forecast3High, white_space, "both"))

set forecast1Low to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==1{print;exit}' | sed -e 's/.*low=//;s/high=.*//' | sed 's/\"//g'") as string
set forecast1Low to (my trim_string(forecast1Low, white_space, "both"))

set forecast2Low to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==2{print;exit}' | sed -e 's/.*low=//;s/high=.*//' | sed 's/\"//g'") as string
set forecast2Low to (my trim_string(forecast2Low, white_space, "both"))

set forecast3Low to (do shell script "awk '/yweather:forecast/{print $0}' " & weatherFile & "| awk 'NR==3{print;exit}' | sed -e 's/.*low=//;s/high=.*//' | sed 's/\"//g'") as string
set forecast3Low to (my trim_string(forecast3Low, white_space, "both"))

--set forecastDay1 to forecast1Day & ": " & forecast1Conditions & ", " & forecast1High & degrees & " Low: " & forecast1Low & degrees
--set forecastDay2 to forecast2Day & ": " & forecast2Conditions & ", " & forecast2High & degrees & " Low: " & forecast2Low & degrees
--set forecastDay3 to forecast3Day & ": " & forecast3Conditions & ", " & forecast3High & degrees & " Low: " & forecast3Low & degrees

set forecastDay1 to forecast1Day & ": " & forecast1Conditions & ", " & forecast1High & degrees
set forecastDay2 to forecast2Day & ": " & forecast2Conditions & ", " & forecast2High & degrees
set forecastDay3 to forecast3Day & ": " & forecast3Conditions & ", " & forecast3High & degrees

set distance to (do shell script "grep -E 'yweather:units' " & weatherFile & "| sed -e 's/.*distance=//;s/pressure=.*//' | sed 's/\"//g'") as string
set distance to (my trim_string(distance, white_space, "both"))

set speed to (do shell script "grep -E 'yweather:units' " & weatherFile & "| sed -e 's/.*speed=//;s/\\/>.*//' | sed 's/\"//g'") as string
set speed to (my trim_string(speed, white_space, "both"))

set weatherCondition to (do shell script "grep -E 'yweather:condition' " & weatherFile & "| sed -e 's/.*text=//;s/code=.*//' | sed 's/\"//g'") as string
set weatherCondition to (my trim_string(weatherCondition, white_space, "both"))

set weatherTemp to (do shell script "grep -E 'yweather:condition' " & weatherFile & "| sed -e 's/.*temp=//;s/date=.*//' | sed 's/\"//g'") as string
set weatherTemp to (my trim_string(weatherTemp, white_space, "both"))

set weatherCondition to weatherCondition & ", " & weatherTemp & degrees

set weatherWindChill to (do shell script "grep -E 'yweather:wind' " & weatherFile & "| sed -e 's/.*chill=//;s/direction=.*//' | sed 's/\"//g'") as string
set weatherWindChill to (my trim_string(weatherWindChill, white_space, "both"))

set weatherWindDirection to (do shell script "grep -E 'yweather:wind' " & weatherFile & "| sed -e 's/.*direction=//;s/speed=.*//' | sed 's/\"//g'") as string
set weatherWindDirection to (my trim_string(weatherWindDirection, white_space, "both"))
set weatherWindDirection to (my windDirection(weatherWindDirection))

set weatherWindSpeed to (do shell script "grep -E 'yweather:wind' " & weatherFile & "| sed -e 's/.*speed=//;s/\\/>.*//' | sed 's/\"//g'") as string
set weatherWindSpeed to (my trim_string(weatherWindSpeed, white_space, "both"))

set weatherWindChillSpeed to "Wind: " & weatherWindSpeed & " " & speed & " Direction: " & weatherWindDirection

set weatherSunrise to (do shell script "grep -E 'yweather:astronomy' " & weatherFile & "| sed -e 's/.*sunrise=//;s/sunset=.*//' | sed 's/\"//g'") as string
set weatherSunrise to (my trim_string(weatherSunrise, white_space, "both"))

set weatherSunset to (do shell script "grep -E 'yweather:astronomy' " & weatherFile & "| sed -e 's/.*sunset=//;s/\\/>.*//' | sed 's/\"//g'") as string
set weatherSunset to (my trim_string(weatherSunset, white_space, "both"))

set weatherSunrise24 to (h12toh24(weatherSunrise, ":"))
set weatherSunset24 to (h12toh24(weatherSunset, ":"))

set weatherSunRiseSet to "Sunrise: " & weatherSunrise24 & " Sunset: " & weatherSunset24

set weatherIcon to (do shell script "grep -E 'yweather:condition' " & weatherFile & "| sed -e 's/.*code=//;s/temp=.*//' | sed 's/\"//g'") as string
set weatherIcon to (my trim_string(weatherIcon, white_space, "both"))

do shell script ("cp " & pathName & "/png/" & weatherIcon & ".png " & pathName & "/WeatherIcon.png")

do shell script ("echo " & forecastDay1 & newline & forecastDay2 & newline & forecastDay3 & newline & weatherWindChillSpeed & newline & weatherSunRiseSet)
-- do shell script ("echo " & forecastDay1 & newline & forecastDay2 & newline & weatherWindChillSpeed & newline & weatherSunRiseSet & newline)

end run

on h12toh24(input, separator)
set t to words of text 1 thru -3 of input
if (text -2 thru -1 of input is "pm") then set item 1 of t to (item 1 of t) + 12
repeat 3 - (count t) times
set end of t to 0
end repeat
tell (1000000 + (item 1 of t) * 10000 + (item 2 of t) * 100 + (item 3 of t)) as text
return text 2 thru 3 & separator & text 4 thru 5
end tell
end h12toh24

on trim_string(the_string, trim_chars, trim_parameter)
set start_char to 1
set end_char to length of the_string
set all_chars to (characters of the_string)

if trim_parameter is in {"left", "both"} then
repeat with each_char in all_chars
if each_char is not in trim_chars then exit repeat
set start_char to (start_char + 1)
end repeat
end if

if trim_parameter is in {"right", "both"} then
set all_chars to reverse of all_chars
repeat with each_char in all_chars
if each_char is not in trim_chars then exit repeat
set end_char to (end_char - 1)
end repeat
end if

try
return text start_char thru end_char of the_string
on error
return ""
end try
end trim_string

on windDirection(theDegrees)

set degrees to theDegrees as number

if (degrees ≥ 0 and degrees ≤ 11.25) then
return "N"
end if
if degrees > 11.25 and degrees ≤ 33.75 then
return "NNE"
end if
if (degrees > 33.75 and degrees ≤ 56.25) then
return "NE"
end if
if (degrees > 56.25 and degrees ≤ 78.75) then
return "ENE"
end if
if (degrees > 78.75 and degrees ≤ 101.25) then
return "E"
end if
if (degrees > 101.25 and degrees ≤ 123.75) then
return "ESE"
end if
if (degrees > 123.75 and degrees ≤ 146.25) then
return "SE"
end if
if (degrees > 146.25 and degrees ≤ 168.75) then
return "SSE"
end if
if (degrees > 168.75 and degrees ≤ 191.25) then
return "S"
end if
if (degrees > 191.25 and degrees ≤ 213.75) then
return "SSW"
end if
if (degrees > 213.75 and degrees ≤ 236.25) then
return "SW"
end if
if (degrees > 236.25 and degrees ≤ 258.75) then
return "WSW"
end if
if (degrees > 258.75 and degrees ≤ 281.25) then
return "W"
end if
if (degrees > 281.25 and degrees ≤ 303.75) then
return "WNW"
end if
if (degrees > 303.75 and degrees ≤ 326.25) then
return "NW"
end if
if (degrees > 326.25 and degrees ≤ 348.75) then
return "NNW"
end if
if (degrees > 348.75 and degrees ≤ 360) then
return "N"
end if

return ""

end windDirection

I then have a collection of 47 PNGs for the weather icons downloaded from the web in the folder /Users/xxxx/Documents/Settings/WeatherIcon/png. Run the script via Geektool/Nerdtool.

I then point to the created PNG In the folder Users/xxx/Documents/Settings/WeatherIcon for the current weather icon.

HTH

Binarymix
Apr 18, 2014, 10:19 AM
Does anyone know of a set or place to get the NEW yahoo icons at a larger size?
I kind of like the flat style and think it would look pretty neat on the desktop.

Thanks!

Image (https://dl.dropboxusercontent.com/u/870242/Screen%20shot%202014-04-03%20at%206.34.24%20PM.png)

I modified a geeklet to use these icons, which I extracted from the iOS Yahoo! weather app.

You'll have to set it up for your location/directories. Or just use the icons for your existing theme :)

Here's what mine looks like:

https://dl.dropboxusercontent.com/u/30301945/Desktop.png

469076