Geektool Your Geektool scripts

Status
Not open for further replies.

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
I know we already have monthly desktop threads, but Geektool is becoming more and more popular, and figured it would probably be better and easier for everyone to have a collection of their Geektool layout in one place.

Geektool
Download Here

Geektool.png
All using the 'Shell' selection:
Date: date +%d
Month: date +%B
Day: date +%A
Time: date +"%I:%M"
Alternatives:
Without the '0' infront of the hours 1-9, use: date +%l:%M
24 hour clock, with seconds: date '+%H:%M:%S'
24 hour clock, without seconds: date '+%H:%M'
AM/PM: date +"%p"
Font: Helvetica Neue (Regular, Bold, Light)


Weather (need Lynx) [Shell]:
Temperature: lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=YOURZIPCODE|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'
Conditions: lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=YOURZIPCODE|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'

iTunesGeektool.png
iTunes [Shell]: osascript ~/LocationOfScript.scpt
Using Script Editor:
Code:
on run
	set info to ""
	set info2 to ""
	tell application "System Events"
		set num to count (every process whose name is "iTunes")
	end tell
	if num > 0 then
		tell application "iTunes"
			if player state is playing then
				set who to artist of current track
				set what to name of current track
				set info to what & " by " & who as string
			end if
		end tell
	end if
	return info
end run
"Kohbens-esque" background for docks, see Melrose's post here.

Most people are using Bowtie to display their iTunes info though.
 

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
GREAT thread idea! Thanks for posting these. I can now begin to make my desktop this much cooler. :)
Thanks. :)


Does anyone know if it's possible to have images displayed instead of text for the weather? Having a cloud for cloudy, sun for sunny, etc.
 

bc008

macrumors 68000
Aug 6, 2007
1,718
0
Michigan
is geektool something you have to download? if so where? i would love a large clock and weather displayed on my desktop :)
 

ethical

macrumors 68000
Dec 22, 2007
1,661
1
Oh man, I should have put a link up with the main post, I'll do that right away. :eek:

Download Here
complete noob here, i've never done programming or coding in my life... but this looks cool :p

How exactly do i use the code posted above?

2Shae posted the following code in the Desktop thread:

Time: date +%l:%M
Date No.: date +%d
Month: date +%B
Day: date +%A

So how do i use this? Do i select "Shell" from the drop down and simply past it in? Does anyone have an idiots guide to pasting in pre-written code? Sorry for the noob-ness!!

Cheers,

Luke
 

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
complete noob here, i've never done programming or coding in my life... but this looks cool :p

How exactly do i use the code posted above?

...

So how do i use this? Do i select "Shell" from the drop down and simply past it in? Does anyone have an idiots guide to pasting in pre-written code? Sorry for the noob-ness!!

Cheers,

Luke
Open GeekTool and click 'New Entry' (bottom left) and then select 'Shell' from the drop down like you said, and just paste the code.

You can change the appearance from the Colors and Fonts tab.

Hope that helps. :)
 

ethical

macrumors 68000
Dec 22, 2007
1,661
1
Open GeekTool and click 'New Entry' (bottom left) and then select 'Shell' from the drop down like you said, and just paste the code.

You can change the appearance from the Colors and Fonts tab.

Hope that helps. :)
yeah thats what i tried, but nothing comes up (except the box it's meant to be displayed in).
it is just simply paste it exactly as it appears in my post yeah? thanks for the help by the way :)
 

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
yeah thats what i tried, but nothing comes up (except the box it's meant to be displayed in).
it is just simply paste it exactly as it appears in my post yeah? thanks for the help by the way :)
They should all work, it looks identical to the code I have, except for the time function.

For time, use:
Code:
date +"%I:%M"
It might have to do with the colour of the text on your background. I think the default colour is black, so if you have a black background it wont show up. I learned it the hard way. ;)
 

ethical

macrumors 68000
Dec 22, 2007
1,661
1
They should all work, it looks identical to the code I have, except for the time function.

For time, use:
Code:
date +"%I:%M"
It might have to do with the colour of the text on your background. I think the default colour is black, so if you have a black background it wont show up. I learned it the hard way. ;)
haha, oh dear. i was being a complete muppet. i was pasting in the "Date: code" bit as well, i didnt realise they were just there for reference purposes. Thank you for your help! Is much appreciated!
One other quick think while im here.. how would i get it to say "Time:" before the time? because at the moment it just says 22:59. Thanks!
 

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
haha, oh dear. i was being a complete muppet. i was pasting in the "Date: code" bit as well, i didnt realise they were just there for reference purposes. Thank you for your help! Is much appreciated!
One other quick think while im here.. how would i get it to say "Time:" before the time? because at the moment it just says 22:59. Thanks!
It happens to the best of us. :D

I have no idea, hopefully someone else can help.
 
  • Like
Reactions: hayduek

Ljohnson72

macrumors 6502a
Dec 21, 2008
733
2
Denver, Co
Is there a way to delete one of the scripts? I have something but I want to delete it and the Shell is no longer showing in GeekTool.
 

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
Is there a way to delete one of the scripts? I have something but I want to delete it and the Shell is no longer showing in GeekTool.
In the groups panel on the left, select the one you want to delete and click 'Delete Entry' (bottom left).
 

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
Thanks :D Sorry, one more question... Should I put each script in another command or can I just put them all in one?
I have them in separate entries, but I doubt they would work all in one.
 

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
if somebody can help me, i cant get the temp and contitions to show up. i copy and pasted, then change to my zip code, but no text shows up...

here is what i copied...

lynx -dump http://printer.wunderground.com/cgi-...95816|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'
You have to have the lynx browser installed.

You can download it here.

I think its Leopard only, but if anyone finds a Tiger version, point me to it. :)
 

Ljohnson72

macrumors 6502a
Dec 21, 2008
733
2
Denver, Co
You have to have the lynx browser installed.

You can download it here.

I think its Leopard only, but if anyone finds a Tiger version, point me to it. :)

I have Lynx installed to and it just shows code.

Make sure when you copy the URL it's not

cgi-...958, but the entire URL - which I'm assuming is

http://printer.wunderground. com/cgi-bin/findweather/getForecast?query=ZIPCODEHERE|AWK


Get rid of the space between wunderground and .com - and insert your own Zipcode. Worth a try?
 

monke

macrumors 65816
Original poster
May 30, 2005
1,437
2
I figured it out.

When I copied the links from EV0LUTION's post in the January Desktop thread, it copied part of the link.

I updated the top post with a working one, but click the link then copy the full URL and paste it back in with your zip code, otherwise it won't work. :)

http://printer.wunderground. com/cgi-bin/findweather/getForecast?query=ZIPCODEHERE|AWK

Get rid of the space between wunderground and .com - and insert your own URL. Worth a try?
The full URL is:
http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=ZIPCODE

I updated it on the first post, it was my error.

Someone let me know if this works, I can't try it. :eek:
 

Ljohnson72

macrumors 6502a
Dec 21, 2008
733
2
Denver, Co
The full URL is:
http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=ZIPCODE

I updated it on the first post, it was my error.

Someone let me know if this works, I can't try it. :eek:
Yeah when I copied it originally it gave the ... in the middle of the URL. I just googled part of the URL to try to find the full one - but you updated it so I guess I didn't need to bother..

I will try it tomorrow my self, my laptop doesn't have Geektool or Lynx installed on it.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.