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.
On the left side I have that black box, is there a way to set it to always be behind so it doesnt fade my font? You can set the stuff to always be on top. And I really want to get the iCal events to work but I installed the iCal buddy and did all the stuff said to be done in the tutorial and it doesnt show up. Any thoughts?

Screenshot2010-01-03at114340AM.png
 
Anyone know how to made script for get seconds,minutes, or days left to 2011 ?

that would be great :D
Create a php script as follows:
Code:
<?php
date_default_timezone_set('America/New_York');
$nxtYear = date(Y)+1;
$futDate = mktime(00,00,00,01,01,$nxtYear);
$nowDate = time();
$secRemain = number_format(($futDate - $nowDate),0,'.',',');
$minRemain = number_format(($futDate - $nowDate)/60,0,'.',',');
$hrsRemain = number_format(($futDate - $nowDate)/3600,0,'.',',');
$dayRemain = number_format(($futDate - $nowDate)/86400,0,'.',',');
printf("Seconds Until %4s :%' 11s\n",$nxtYear,$secRemain);
printf("Minutes Until %4s :%' 11s\n",$nxtYear,$minRemain);
printf("Hours Until %4s   :%' 11s\n",$nxtYear,$hrsRemain);
printf("Days Until %4s    :%' 11s\n",$nxtYear,$dayRemain);
?>
Your time zone setting may be different. Then, using Mac's text editor (making sure you use Format - Make Plain Text) save this script as date_diff.php

I saved the file to /var/tmp (that's where I keep all my Geektools scripts/files/images).

In Geektools create a shell script that runs the above php script.
Code:
php /var/tmp/date_diff.php

The above will output something like:

Code:
Seconds Until 2011 : 31,316,869
Minutes Until 2011 :    521,948
Hours Until 2011   :      8,699
Days Until 2011    :        362

Set your refresh rate to 1 second to see the time count-down.
 
On the left side I have that black box, is there a way to set it to always be behind so it doesnt fade my font?
Assuming you used Geektools to create the black box; e.g., an empty shell, you can right-click on the shell and choose Send to Back.
 
these are my geektool scripts for finance does anyone know how to get them to go red when their at a loss and green when their at a gain.

Hi MSTRKRFT - here's my workaround all the way back from post 751:

Hi antcuc,

It's actually just a simple workaround. You make two scripts laid on top of each other, one in green and one in red. Then you configure the red one not to print anything if the stock has gone up and green one not to print anything if the stock has gone down.

So, take a general stock quote script. Here's mine for the DOW:

curl http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/price-panel style/,/ Close/p' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'| sed '/^$/d' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | head -1 | sed 's/^/DOW: /g'

That outputs: DOW: 9,256.26 -24.71 (-0.27%)

Now copy it so you have two.

Then add this to the end of the one you make red:
| sed -n '/-/p'
That makes it so it will only print lines where a "-" appears, so it'll only give the output if things went south that day.

Then, add this one to the one that you make green:
| sed '/-/d'
That'll delete the output if a "-" appears, so it'll only print if the index went up or stayed put.

Since, you're just modifying the format of the two scripts, you can have any change occur depending on whether things went up or down. You could have the background change colour or tranparency. You could change the font, size, whatever.

Hope that helps, let me know if you have any other questions.

(Oh yeah, and to make this work for other stocks, you just have to change the link in the original curl script, and then change the label that you give it at the end of the script)
 
Hey at the risk of being repetitive and annoying can anyone help me with this http://www.macosxtips.co.uk/index_files/display-ical-events-to-do-list-on-desktop.html

I downloaded and installed iCalBuddy and I put in the code that he has posted at the bottom, which I was skeptical of because I couldnt find that location to go and find the folders and stuff but thats where terminal said it installed iCalBuddy. All I can get is it to come up with the manual to understanding the -s and all those codes. It seems the tutorial is with Geektool 2 and Im on Geektool 3 but yeah.
 
Revamped my desktop for the first time in a while. The scripts used are all standard and posted here, I'm using Bowtie for the album artwork and SimpleFloatingClock for the clock in the middle. Loving this new desktop so far! Any suggestions for what to fill in the center with?

jW
 

Attachments

  • Screen shot 2010-01-03 at 11.59.12 PM.PNG
    Screen shot 2010-01-03 at 11.59.12 PM.PNG
    609.1 KB · Views: 269
Attention Geektool Thread!

I'd really like to hear what you think of my guide. So please let me know if one thing needs to be worked on. I enjoy doing this for like an hour a night. I went through 4 versions in a matter of a day, it will probably be slower from here on out just because I'm struggling to find new stuff.
 

Attachments

  • Geektool_v0.4.txt
    10.5 KB · Views: 468
I scoured the entire thread to make a comprehensive list of most geektool scripts because I got tired of going through all 63 pages. Please look at my uploaded files see if you have anything to add and then PM me with what you think will help. I'm uploading this now but it might change within the next hour or two so pay attention to that. I hope this can help the beginners and maybe we can see better codes.

MSTRKRFT

Thank you very much for your work, this should be posted in the first thread post, and probably make it a sticky.
 
Does anyone have a script for Sunset and Sunrise that doesn't need zipcodes?

I tried to use the ones you posted on page 10 with lynx and nothing came up. I do have lynx installed and everything but still nothing showed up.

EDIT: I just got my iCal events and To Do list to show up. I wanted to get the headers underlined but when I choose underline in the font section it doesn't actually underline it. Any suggestions?
 
I tried to use the ones you posted on page 10 with lynx and nothing came up. I do have lynx installed and everything but still nothing showed up.

EDIT: I just got my iCal events and To Do list to show up. I wanted to get the headers underlined but when I choose underline in the font section it doesn't actually underline it. Any suggestions?

I don't use lynx and more. Use the curl scripts.
 
I don't use lynx and more. Use the curl scripts.

When I try that nothing shows up when I use my Zip and I went to wund website and put my zip in and copied the adress and when I use that on geektool I just get all the html info, same problem you seemed to have back then. How did you fix it?
 
When I try that nothing shows up when I use my Zip and I went to wund website and put my zip in and copied the adress and when I use that on geektool I just get all the html info, same problem you seemed to have back then. How did you fix it?

Hmm makes it's not working again.
 
I'd really like to hear what you think of my guide. So please let me know if one thing needs to be worked on. I enjoy doing this for like an hour a night. I went through 4 versions in a matter of a day, it will probably be slower from here on out just because I'm struggling to find new stuff.

i'm glad someone had time and will to collect and share all the infos drafted till now on this thread and I will be glad to contribute someway.
for now I'll try to answer this:
Image Grabber
curl --silent "http://weather.yahoo.com/netherlands/north-holland/haarlem-729636YOU GOTTA REPLACE ALL THIS BUT I REALLY DON"T KNOW HOW TO PUT IT" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /var/tmp/weather_image.png\
Displays nothing but it gets the weather image for the next shell script.
searching your city on yahoo's weather service at weather.yahoo.com you'll be redirected to your city's weather page and that's the URL you should use between the quotes.

finally I think it would be better to share this document (if author is right) in any document sharing service which allows a simpler and more immediate editing functions for the creator and the editors allowed by him, I thought to something like google docs or any collaborative debugging tool.
 
i would like to change my dock icons, but I'm stuck on iTunes. :( any advice?
 

Attachments

  • Screen shot 2010-01-06 at 20.41.50.png
    Screen shot 2010-01-06 at 20.41.50.png
    1.1 MB · Views: 315
I am pretty satisfied with all my Geektool stuff and I have been able to get everything to work the way I want: forecast, weather image, radar maps, calendars, etc.

However, since the weather scripts stopped working with lynx and weather underground, i have been looking for a way to get the temperature ONLY without the conditions again.

I can get "Fair, 24 F" from Yahoo
But I can't seem to get just "24 F"

Any ideas on that?
Oh, and I am still using the old Geektool :eek:

Woof, Woof - Dawg
pawprint.gif
 
I can get "Fair, 24 F" from Yahoo
But I can't seem to get just "24 F"

Any ideas on that?

this is your script for temperature only:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=[B]YOURCITY[/B]&u=[B]c[/B]" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//' [B]-e 's/[A-Za-z]*, //'[/B] | tail -n1
  • remember to change the substring YOURCITY with the code of your city;
  • the c means Celsius, for Fahrenheit should replace it with f;
  • the last bold substring is the part i append to let show only the temperature.
 
this is your script for temperature only:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=[B]YOURCITY[/B]&u=[B]c[/B]" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//' [B]-e 's/[A-Za-z]*, //'[/B] | tail -n1
  • remember to change the substring YOURCITY with the code of your city;
  • the c means Celsius, for Fahrenheit should replace it with f;
  • the last bold substring is the part i append to let show only the temperature.

Thanks!
That works for things like "Cloudy, 42 F" = "42 F"
But if it is "Partly Cloudy, 42 F" = "Partly 42 F"

Woof, Woof - Dawg
pawprint.gif
 
That works for things like "Cloudy, 42 F" = "42 F"
But if it is "Partly Cloudy, 42 F" = "Partly 42 F"

sorry, I forget a space in the regular expression...

Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=YOURCITY&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//' [B]-e 's/[A-Z a-z]*, //'[/B] | tail -n1

this one works great!
 
sorry, I forget a space in the regular expression...

Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=YOURCITY&u=c" | grep -E '(Current Conditions:|[A-Z]<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//' [B]-e 's/[A-Z a-z]*, //'[/B] | tail -n1

this one works great!

EXCELLENT!!
Thanks!
Really appreciate it!

Woof, Woof - Dawg
pawprint.gif
 
I'd really like to hear what you think of my guide. So please let me know if one thing needs to be worked on. I enjoy doing this for like an hour a night. I went through 4 versions in a matter of a day, it will probably be slower from here on out just because I'm struggling to find new stuff.

wow this is great! thank you so much for putting this together for all the noobs like me!... the only thing im struggling on is getting the weather icon- i followed everything to a T and still not showing up...??
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.