Geektool Your Geektool scripts

Discussion in 'UI Customization' started by monke, Jan 4, 2009.

Thread Status:
Not open for further replies.
  1. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #1
    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)

    [​IMG]
    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.
     
  2. macrumors 6502

    EV0LUTION

    Joined:
    Jul 21, 2008
    Messages:
    475
    Location:
    Florida
    #2
    Your welcome, this is what the weather scripts output.
     

    Attached Files:

  3. macrumors member

    max1018

    Joined:
    Dec 28, 2007
    Messages:
    77
    #3
    Cheers for the info!
     

    Attached Files:

  4. macrumors 6502a

    Joined:
    Jan 28, 2008
    Messages:
    868
    Location:
    Memphis, TN
    #4
    GREAT thread idea! Thanks for posting these. I can now begin to make my desktop this much cooler. :)
     
  5. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #5
    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.
     
  6. macrumors 68000

    bc008

    Joined:
    Aug 6, 2007
    Messages:
    1,719
    Location:
    Michigan
    #6
    is geektool something you have to download? if so where? i would love a large clock and weather displayed on my desktop :)
     
  7. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #7
    Oh man, I should have put a link up with the main post, I'll do that right away. :eek:

    Download Here
     
  8. macrumors 68000

    Joined:
    Dec 22, 2007
    Messages:
    1,661
    #8
    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
     
  9. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #9
    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. :)
     
  10. macrumors 68000

    Joined:
    Dec 22, 2007
    Messages:
    1,661
    #10
    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 :)
     
  11. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #11
    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. ;)
     
  12. macrumors 68000

    Joined:
    Dec 22, 2007
    Messages:
    1,661
    #12
    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!
     
  13. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #13
    It happens to the best of us. :D

    I have no idea, hopefully someone else can help.
     
  14. macrumors demi-god

    Ljohnson72

    Joined:
    Dec 21, 2008
    Messages:
    735
    #14
    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.
     
  15. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #15
    In the groups panel on the left, select the one you want to delete and click 'Delete Entry' (bottom left).
     
  16. macrumors demi-god

    Ljohnson72

    Joined:
    Dec 21, 2008
    Messages:
    735
    #16
    Thanks :D Sorry, one more question... Should I put each script in another command or can I just put them all in one?
     
  17. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #17
    I have them in separate entries, but I doubt they would work all in one.
     
  18. macrumors demi-god

    Ljohnson72

    Joined:
    Dec 21, 2008
    Messages:
    735
    #18
    Thanks again.

    [​IMG]
     
  19. macrumors 6502

    velvetelvis

    Joined:
    Oct 26, 2007
    Messages:
    469
    #19
    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 " " }'
     
  20. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #20
    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. :)
     
  21. macrumors 6502

    velvetelvis

    Joined:
    Oct 26, 2007
    Messages:
    469
    #21
    got it installed allready.
     
  22. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #22
    The links I gave don't seem to be working right now, I'll try and find a solution.
     
  23. macrumors demi-god

    Ljohnson72

    Joined:
    Dec 21, 2008
    Messages:
    735
    #23

    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?
     
  24. macrumors 65816

    monke

    Joined:
    May 30, 2005
    Messages:
    1,439
    #24
    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. :)

    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:
     
  25. macrumors demi-god

    Ljohnson72

    Joined:
    Dec 21, 2008
    Messages:
    735
    #25
    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.
     
Thread Status:
Not open for further replies.

Share This Page