Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.
Can someone describe me the differences between the current GeekTool 3 and NerdTool?

Reading the short info on in the first link tells me that NT is being done by the original developer, and GT3 is being handled by the same people who developed GT2? They are the same thing aren't they?
 
So, how do I do this? All I want is for the Celsius temperature to be Fahrenheit.
Thanks! :apple:

for Fahrenheit temperatures you need to replace the substring after your city code "&u=c" with "&u=f"; use this script:
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=YOURCITY&u=f" | 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>//' | tail -n1
 
I tried both poppero and Vicious' way of inputting it and they don't seem to show up. (poppero you suggested 3 shell scripts and Vicious told me to do 2 shell scripts and one picture script) Either way, it doesn't seem to work for me. I inputed the code that weather.yahoo.com gave to me (http://weather.yahoo.com/forecast/CAXX0273.html, so the code is CAXX0273) into my weather title and weather curl too.
I also tried inputting my zip code for the weather curl too, but that didn't work.

Could it be because I live in Canada?
 
Could it be because I live in Canada?

GeekTool doesn't mind where do you live, if you can see the weather in the yahoo page then you will see the same informations on your desktop.

create a new shell script in geektool and set it like this image for weather title:

your script must be this one:
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=CAXX0273&u=f" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'

now create a new shell script and set it like in the image:

your script for this item must be this one:
Code:
curl --silent "http://weather.yahoo.com/forecast/CAXX0273.html" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png

finally create a picture item and set it like in the image:


i can't definitely be more clear then this...
 
what version of geektool are you using and are you running 10.5 or 10.6? i've found that when running SL Geektool v2 doesnt display the weather correctly. and just in general v2 didnt work well for me when running old leopard.

I have 10.5 and my Geektool is v2.1.2

So I'm assuming it doesn't work, huh. No wonder.
 
I'm having an issue with the weather condition display.

It was working for a while, but then i went to change the refresh time it changed to displaying "Partly Cloudy will not improve until an hour or two after". It was working fine until just now.

Why is it outputting more than just the condition?? and how do i get rid of it?
here's the script i'm using:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=ZPCDE|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'

Thanks,

also here's my desktop when the weather condition is working right:
Picture1-26.png
 
n00b question. I had Geektool 2 with Leopard, but I've gone straight to Geektool 3 for my Snow Leopard installation. When I drag an icon to my desktop, I can't figure out how to input any of the scripts into it. I'm sure it's easy and that I'm missing something, but I'm at a complete loss abt what to do.

I end up with the Geektool pref pane, and what looks like a HUD display with "Geeklet Settings" in the middle. Also, I'm not having much luck looking for a tutorial for GT 3, so any help with that would be great.

Thanks much.

Sorry to be so blatant, but I'm hoping someone can help me out with this. Thanks!
 
i'm also using geektool 3

i had exactly the same problem with the weather, however, i was bold and changed the output encoding and got mine to work perfectly.

just change the output encoding on the temperature from UTF8 to ASCII. that's all I did and temp showed up for me. :)

let me know if this works for you guys as it did me!

That works too. :D
 
Sorry to be so blatant, but I'm hoping someone can help me out with this. Thanks!

In the center of the HUD window, after you've dragged your shell "geeklet" to wherever you want it on the screen, is the "Command" text box. Paste your code in there, and wait a second for it to refresh.

jW
 
Hi Scotty96LSC,

Just saw your desktop in the Sept desktop thread. Any chance you could post your scripts that you are using? They look great, and the desktop pic is awesome too.

Thanks.
 
In the center of the HUD window, after you've dragged your shell "geeklet" to wherever you want it on the screen, is the "Command" text box. Paste your code in there, and wait a second for it to refresh.

jW

Thanks. Still having no luck. Here's a grab of what I'm looking at; I can't paste anything into those windows, and I know it's a shell command that I've pulled out there. Again, Geektool 2 was no problem for me, but this one on SL is frustrating me. I know it'll be fine once I figure it out, but for now it's a pain.
 

Attachments

  • Screen shot 2009-09-15 at 10.18.00 PM.jpg
    Screen shot 2009-09-15 at 10.18.00 PM.jpg
    167.1 KB · Views: 146
Thanks. Still having no luck. Here's a grab of what I'm looking at; I can't paste anything into those windows, and I know it's a shell command that I've pulled out there. Again, Geektool 2 was no problem for me, but this one on SL is frustrating me. I know it'll be fine once I figure it out, but for now it's a pain.

I don't see where you've pulled anything out. It's behaving as if you haven't pulled out a shell script at all. Make sure you're pulling it to the desktop (and annoyingly, not onto any window of any type).

jW
 
I figured it out. There's something wrong in this bit of the code that's causing the problems:

Code:
for (i=3; i<=3; i++) printf $i " " }'

When you remove that code, you can display the temperature data, though without the °F bit. I just used an echo call to fill in that bit. If anybody can figure out a workaround so we could get it all in one shell module, that would be great. Otherwise I'll go with my workaround.

Here's the code to get the Temperature from wunderground to work with GeekTool 3.0 (don't forget to replace "YOURCITY" with your city/zip:

Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=YOURCITY|awk '/Temp/{printf $2, ": "}'
Wow! First GT weather-script that i managed to make work here in Finland,thanks! Do you have any tips to get also that verbal forecast on the screen? And maybe also weather picture.

Like Storm in the Helsinki, 10C
 
Hi Scotty96LSC,

Just saw your desktop in the Sept desktop thread. Any chance you could post your scripts that you are using? They look great, and the desktop pic is awesome too.

Thanks.
Date:
date +%d
Month:
date +%B
Day:
date +%A
Three Months:
# prev month
cal -m $(date -v-1m +%b)

#next month
cal -m $(date -v+1m +%b)

#Month after next
cal -m $(date -v+2m +%b)
Temp:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=yourzip|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'
Conditions:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=yourzip|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'
Artist Name:
osascript /Users/scott/Library/Scripts/albuminfostacked2.scpt
Track and Album:
osascript /Users/scott/Library/Scripts/albuminfostacked3.scpt
Next 5 Songs:
osascript /Users/scott/Library/Scripts/NextiTunesSongs.scpt
Next 5 Songs Title:
echo Next 5 Songs
Memory:
top -l 1 | awk '/PhysMem/ {print "Memory Used: " $8}'
top -l 1 | awk '/PhysMem/ {print "Memory Inactive: " $6+$10"M"}'
Geek Tool Memory:
ps axo "rss,ucomm" | awk '/Geek/ {printf "Geektool Memory Use: %.2f", $1/1024}'
Horizontal Calendar:
cal | sed -e '1d' -e '2p;2p;2p;2p;2p' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/././g') /"
Uptime:
uptime
HD Space:
df -g | awk '/\/dev\/disk0/ {print "HD - "$2-$3"G of "$2"G remaining ""("$5")" }';
Wallpaper

I can email the itunes scripts for you to edit or they are all located in this thread.
 
Thanks. Still having no luck. Here's a grab of what I'm looking at; I can't paste anything into those windows, and I know it's a shell command that I've pulled out there. Again, Geektool 2 was no problem for me, but this one on SL is frustrating me. I know it'll be fine once I figure it out, but for now it's a pain.

Click and HOLD on SHELL and drag it to the desktop.
 
I managed to get sunset,conditions and temperature to screen with these codes:

Sunset
Code:
echo "Sunset at " &lynx -dump http://printer.wunderground.com/global/stations/02944.html|awk '/Sunset/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'
Conditions
Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=Tampere|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'
Temperature
Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=Tampere|awk '/Temp/{printf $2, ": "}'
No its ok, but temp scrips prints only single temperature number to screen. Any ideas how to get also °C-symbol at the end?
 
Click and HOLD on SHELL and drag it to the desktop.

Ah, that did it. Also, I don't think I knew the trick making sure it was dragged directly to the desktop instead of anywhere on the screen. Thanks for the help to both you and Mal!
 
New Challenge!

OK guys... It is clear that we have some talent in this thread. I need some help with a new challenge ;) I want to display my ratio from several private bittorrent trackers on my desktop. An example of the readout would be something like:

ThePurplePalace: 1.23TB Up // 234GB Down // 5.25 Ratio
-or-
IPTracker: 1.23TB Uploaded - 234GB Downloaded - 5.25 Total

You get the idea.

If I had to venture a guess, the tricky parts to scripting something like this would be two things: 1) Authentication 2) Site-specific syntax (as every site has a unique display). If someone has already posted this, I apologize... The thread is quite large. Any and all help / pointing in the right direction would be stellar. Thanks in advance, Loop. :cool:
 
So, I was playing around with a weather script, and decided to change it so that the zip-code would be changed with my IP address.

As far as I know, this one is USA only, and really only useful for a laptop

In Geek/nerdtool:

Code:
bash /Users/[Username]/bin/bash/weather.bash

(Or wherever you put the file)

In that file:

Code:
#!/bin/bash

postal1=`curl -s http://phpweby.com/services/iplocation | awk '/Postal code:/{print $3}';`
postal=`echo "$postal1" | awk '{gsub(/<br>/,"")}; 1'`

lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=$postal | awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'; 
printf "[" [;
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=$postal | awk '/Conditions/ && !/Forecast/ {for (i=2; i<=10; i++) printf $i}';
printf "]";
printf "\n";
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=$postal | awk '/Wind/ {printf $1 ": "; for (i=2; i<=10; i++) printf $i " " }';
printf "\n";

That will pull Temperature, Conditions, and Windspeed/Direction
Use the $postal variable for your current zip code
 
Does anyone know of or could set me on the road to making a Geektol that would pull down show info like TV Forecast?

I don't need anything fancy, just text with the time/date that shows will be airing.

I found one for Hulu, but I have no idea how to port it over to TVRage or something similar.
 
I'm using the following to show my current wireless network:

Code:
airport -I | grep -e '[^[:alnum:]_]SSID[^[:alnum:]_]' | awk '{print $2}'

It only displays the first word of the network. Any ideas on how to alter this?
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.