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.

RogersDA

macrumors 6502
Aug 19, 2009
271
0
could you post your script for the calender and date and time also do you know how i can get my hotmail email to show up on the screen like you did?
Calendar at the bottom is the great program DateLine.

Date (w/ thanks to Chartreux for injecting this easier code back to my brain again):
Code:
date +"%d %B %Y"

Time:
Code:
date +"%l:%M %p"

Hotmail: No Clue - Never used it.
 

tozol

macrumors member
Oct 14, 2009
54
0
Leabrooks Derbyshire UK
OK guys just a few tidy up questions for me, as I think Ill leave mine for now as its my xmas theme, and first go.

But take a look at my screen shot, and you see such things as, my cpu, the battery, and trash, scripts,?
Well simple question, they don't seem to refresh on there own, what I mean is, if left on DT as they should, they just stay the numbers they were previous.

Now if i reopen geektool, and click on the box with the details in, they intsantly refresh, so its like I have to manually refresh them.
Any reason why, and how can I fix it.??

1 final point, the cpu one, always shows 100%, doesn't seem right.

thanks for any help...
(click on screeny for full size)


 

libwolf

macrumors newbie
Jul 16, 2008
11
0
Melbourne, Australia
OK guys just a few tidy up questions for me, as I think Ill leave mine for now as its my xmas theme, and first go.

But take a look at my screen shot, and you see such things as, my cpu, the battery, and trash, scripts,?
Well simple question, they don't seem to refresh on there own, what I mean is, if left on DT as they should, they just stay the numbers they were previous.

Now if i reopen geektool, and click on the box with the details in, they intsantly refresh, so its like I have to manually refresh them.
Any reason why, and how can I fix it.??

You did remember to put a time in for 'Refresh Every' in the properties window, right?
 

partyBoy

macrumors 68000
Nov 8, 2009
1,558
0
Dilligaf
Made a bigger version for my MacBook:

GeekTool3.jpg


where did u get that rainbow space wallpaper ?
 

fr3ak

macrumors newbie
Dec 8, 2009
3
0
Picasa script

Hi everyone, cool scripts in this threat. It has helped me allot when playing with geektool.

I've searched Google for at Picasa web album script to display the pictures of my web albums. Do anyone know if this exist?

I know that Picasa uses RSS so maybe one could extract the pictures through that? I want to take between 5 and 10 images randomly from one of my albums and display it on the desktop. Can anyone help with this?

EDIT: BTW, I'm also looking for a script to pool my appointments from Google calendar if anyone can help with this or point me in the right direction?
 

barvid

macrumors newbie
Dec 7, 2009
3
0
Anyone?

I´m really new to this.. :)

Is there anyone that like to help me to extract METAR´s and TAF´s from these to sites. I´ve tried to figure out how to do it my self but.. well, I don´t have a clue!

METAR and TAF and of course select just the ones o need..

Thanks alot guys!

/Barvid

Is there anyone that can help me with this..? Pleeeease.. :)
 

barvid

macrumors newbie
Dec 7, 2009
3
0

Thanks, Yeah. I´ve seen those posts. But the thing is that I can´t get the METARs and TAFs I need with the help of those scripts. So that´s why I posted a question of my own.
But thanks anyway for ya help!
 

Wowzera

macrumors 6502a
Oct 14, 2008
857
28
Brazil
Based on the image you posted that person probably used two shell windows: one for the echo and one for the date. Fonts are the same, but the sizes are different. The echo shell was also moved to its current location, too, I'm sure.
Here is my quick take:
735006002_RV2WF-S.jpg


735004109_iXFRv-M.jpg

Thanks, I already got it to work. My confusion was about if he was using just one shell window or two. If any of us is interested, the font used is Neutra Text Book SC :)
Thanks to all who helped.
 

fr3ak

macrumors newbie
Dec 8, 2009
3
0
I wrote a tiny Ruby script to display RSS-feeds.

It takes a RSS-link as the only parameter and displays the channel name + the time and title of each item.

Put something like this in the Command field of GeekTool (I saved it as "rss.rb" in my personal bin directory):

Code:
~/bin/rss.rb https://www.macrumors.com/macrumors.xml

Script:
Code:
#!/usr/bin/ruby

require 'rss'
require 'open-uri'

rss = RSS::Parser.parse open(ARGV.shift).read, false

puts rss.channel.title

rss.items.each_with_index do |item,i|
  puts "" if i.zero? or item.date.day != rss.items[i-1].date.day

  puts "#{item.date.strftime '%H:%M'}  #{item.title}"
end

Remember to turn on the executable bit: chmod +x rss.rb
No need to install Ruby by the way, it's already included in OS X, so it should work out of the box.

Thanks for the script - works great.

How do i set a limit to the amount of content that is displayed?
 

elykl33t

macrumors newbie
Mar 23, 2009
4
0
I finally managed to make my weather script work, but whenever I try to change the unit from celsius to fahrenheit it stops showing anything at all.

Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USVA0007&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

whenever I try and use printer.wunderground.com like a lot of other people are, I get servers for everything around me (DC, Fairfax, Alexandria, and Ft. Belvoir). any ideas??
 

RogersDA

macrumors 6502
Aug 19, 2009
271
0
I finally managed to make my weather script work, but whenever I try to change the unit from celsius to fahrenheit it stops showing anything at all
There are two "f" variables that need to be changed to "c" in that script (or vice versa). You only did one.

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

Fahrenheit
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USVA0007&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>//' | tail -n1
 

Forsaken

macrumors regular
Dec 1, 2009
214
0
There are two "f" variables that need to be changed to "c" in that script (or vice versa). You only did one.

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

Fahrenheit
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USVA0007&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>//' | tail -n1

Was wondering the same thing. Thanks for the code.
 

DEE9299

macrumors 6502a
Oct 3, 2009
573
0
Boston Mass.
I found this post that discusses getting hotmail into Mac Mail. Maybe if that still works then you can use the applescript to output the correct fields.

I think that was to get it to show up in your mail icon in the dock but I already have my hotmail to show up thru the mail icon in the dock now I need help to get it from there into geektool to the main screen
 

RogersDA

macrumors 6502
Aug 19, 2009
271
0
I think that was to get it to show up in your mail icon in the dock but I already have my hotmail to show up thru the mail icon in the dock now I need help to get it from there into geektool to the main screen

The script I use for showing mail on the desktop involves two items:
an applescript to get the information
a shell script to run the applescript

The following applescript is placed in the directory of choice. Run applescript, insert the following code, compile/save as a file; e.g., mail.scpt
I use /var/tmp to save all my geektool stuff.

The code below uses several spaces that I use to help things line up when using a fixed-width font.

Code:
set newline to ASCII character 10

set finalText to ""

tell application "Mail"
	set theMessages to (messages of inbox whose read status is false)
	repeat with i from 1 to number of items in theMessages
		set thisMessage to item i of theMessages
		set dateMsg to (date received of thisMessage as string)
		set fromMsg to (sender of thisMessage as string)
		set subjMsg to (subject of thisMessage as string)
		set finalText to finalText & " From: " & word 1 of fromMsg & " " & word 2 of fromMsg & newline & " Date: " & word 3 of dateMsg & " " & word 2 of dateMsg & " " & word 4 of dateMsg & newline & " Subj: " & subjMsg & newline & newline
	end repeat
end tell
finalText

Now, in geektools, I use the following shell to run the script:
Code:
echo Unread EMail
osascript /var/tmp/mail.scpt
 

DEE9299

macrumors 6502a
Oct 3, 2009
573
0
Boston Mass.
The script I use for showing mail on the desktop involves two items:
an applescript to get the information
a shell script to run the applescript

The following applescript is placed in the directory of choice. Run applescript, insert the following code, compile/save as a file; e.g., mail.scpt
I use /var/tmp to save all my geektool stuff.

The code below uses several spaces that I use to help things line up when using a fixed-width font.

Code:
set newline to ASCII character 10

set finalText to ""

tell application "Mail"
	set theMessages to (messages of inbox whose read status is false)
	repeat with i from 1 to number of items in theMessages
		set thisMessage to item i of theMessages
		set dateMsg to (date received of thisMessage as string)
		set fromMsg to (sender of thisMessage as string)
		set subjMsg to (subject of thisMessage as string)
		set finalText to finalText & " From: " & word 1 of fromMsg & " " & word 2 of fromMsg & newline & " Date: " & word 3 of dateMsg & " " & word 2 of dateMsg & " " & word 4 of dateMsg & newline & " Subj: " & subjMsg & newline & newline
	end repeat
end tell
finalText

Now, in geektools, I use the following shell to run the script:
Code:
echo Unread EMail
osascript /var/tmp/mail.scpt

Oh boy now I am completely confused ......I am lost where is applescript located
 

Saul89

macrumors newbie
Nov 21, 2009
4
0
OK guys just a few tidy up questions for me, as I think Ill leave mine for now as its my xmas theme, and first go.

But take a look at my screen shot, and you see such things as, my cpu, the battery, and trash, scripts,?
Well simple question, they don't seem to refresh on there own, what I mean is, if left on DT as they should, they just stay the numbers they were previous.

Now if i reopen geektool, and click on the box with the details in, they intsantly refresh, so its like I have to manually refresh them.
Any reason why, and how can I fix it.??

1 final point, the cpu one, always shows 100%, doesn't seem right.

thanks for any help...
(click on screeny for full size)





What is the script for battery percentage? I've scoured the internet looking for one and all I could find was someone's screenshots on flickr and they haven't answered my question on how to do it. I asked earlier in this topic if anyone had a way and didn't get an answer...

Thank you.
 

DEE9299

macrumors 6502a
Oct 3, 2009
573
0
Boston Mass.
The script I use for showing mail on the desktop involves two items:
an applescript to get the information
a shell script to run the applescript

The following applescript is placed in the directory of choice. Run applescript, insert the following code, compile/save as a file; e.g., mail.scpt
I use /var/tmp to save all my geektool stuff.

The code below uses several spaces that I use to help things line up when using a fixed-width font.

Code:
set newline to ASCII character 10

set finalText to ""

tell application "Mail"
	set theMessages to (messages of inbox whose read status is false)
	repeat with i from 1 to number of items in theMessages
		set thisMessage to item i of theMessages
		set dateMsg to (date received of thisMessage as string)
		set fromMsg to (sender of thisMessage as string)
		set subjMsg to (subject of thisMessage as string)
		set finalText to finalText & " From: " & word 1 of fromMsg & " " & word 2 of fromMsg & newline & " Date: " & word 3 of dateMsg & " " & word 2 of dateMsg & " " & word 4 of dateMsg & newline & " Subj: " & subjMsg & newline & newline
	end repeat
end tell
finalText

Now, in geektools, I use the following shell to run the script:
Code:
echo Unread EMail
osascript /var/tmp/mail.scpt

Thanks it works I figured where and how to use apple script ......now i cant stop playing with geektools
 

SchneiderMan

macrumors G3
May 25, 2008
8,332
202
Anyway to have Geektool start automatically on startup? i find my self having to start it up again all the time.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.