[Geektool] Your Geektool scripts - Page 65 - MacRumors Forums
Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Mac Community > Picture Gallery > UI Customization

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old Jan 11, 2010, 05:39 PM   #1601
bugmcw
macrumors newbie
 
Join Date: Dec 2009
Quote:
Originally Posted by MacDawg View Post
This is the only forecast script I have
I don't know enough about the code to change it
But I am sure others do
I just borrow, copy and paste

Code:
curl  "http://weather.yahooapis.com/forecastrss?p=YOURCITY&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1\  L\:\ \2/" | sed "s/\?\(.*\)/\\1/"
Woof, Woof - Dawg
yeah thats the same code i am using... huh... i just don't know enough about what stuff means to parse out the information i actually want.
bugmcw is offline   0
Old Jan 11, 2010, 05:47 PM   #1602
poppero
macrumors member
 
Join Date: Jun 2009
Quote:
Originally Posted by jck1634 View Post
Yeah I can't get that to work for me. Any chance you could share the separators you extracted?
download it from this link.
I do this the same size of the background image, this way you should simply overlay them in NT or GT.
poppero is offline   0
Old Jan 11, 2010, 06:12 PM   #1603
jck1634
macrumors regular
 
Join Date: Mar 2009
Gave it another try, except added a little outer glow to it.



I'm actually quite pleased with it so far.

Thanks for the link! Will give it a try with your separators.
jck1634 is offline   0
Old Jan 11, 2010, 06:20 PM   #1604
MacDawg
macrumors P6
 
MacDawg's Avatar
 
Join Date: Mar 2004
Location: "Between the Hedges"
I had to open the image in GraphicConverter and make the background transparent, then it worked like a charm

Just duplicate the first image in GT and change the file name

Thanks!




Woof, Woof - Dawg
MacDawg is offline   0
Old Jan 11, 2010, 06:43 PM   #1605
jck1634
macrumors regular
 
Join Date: Mar 2009
Thanks bud. Love the way the separators look. Got rid of the outer glow.


Last edited by jck1634; Jan 11, 2010 at 07:32 PM.
jck1634 is offline   0
Old Jan 12, 2010, 08:29 AM   #1606
jck1634
macrumors regular
 
Join Date: Mar 2009
After much tweaking I've finally finished it!

It started off as this...



then to this...



then this..



and after adding some inner bevel, shadow and a touch of gloss, I think I've finally cracked it!



I'm really happy how it turned out. Think I'm going to leave it alone now and get some sleep
jck1634 is offline   0
Old Jan 12, 2010, 09:20 AM   #1607
poppero
macrumors member
 
Join Date: Jun 2009
Quote:
Originally Posted by jck1634 View Post
and after adding some inner bevel, shadow and a touch of gloss, I think I've finally cracked it!
wonderful!!! next step would be sharing your final lines template with us

P.S.: what string do you use to have "1 C" with the in Celsius indication???

Last edited by poppero; Jan 12, 2010 at 10:00 AM.
poppero is offline   0
Old Jan 12, 2010, 09:55 AM   #1608
oneijose
macrumors regular
 
Join Date: Jun 2009
Location: Brooklyn NY
Quote:
Originally Posted by poppero View Post
wonderful!!! next step would be sharing your final lines template with us
This is a great point!!
oneijose is offline   0
Old Jan 12, 2010, 10:01 AM   #1609
proofrock
macrumors newbie
 
Join Date: Jan 2010
Degree mark?

Poppero,

Love this script. Would adore it if someone could help me figure out how to insert a degree mark between the temp and "F".


Best,

Proofrock


Quote:
Originally Posted by poppero View Post
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>//' -e 's/[A-Z a-z]*, //' | tail -n1
this one works great!
proofrock is offline   0
Old Jan 12, 2010, 10:53 AM   #1610
jck1634
macrumors regular
 
Join Date: Mar 2009
Quote:
Originally Posted by poppero View Post
wonderful!!! next step would be sharing your final lines template with us

P.S.: what string do you use to have "1 C" with the in Celsius indication???
I'm cheating a little with the degree symbol. it's just echo o :P

I'm on my iPhone at the moment. I'll put up the lines once I'm home!

Oh and while I'm here, do you or anyone else know of a way to show just the hi-lo temperature for the day?
jck1634 is offline   0
Old Jan 12, 2010, 11:11 AM   #1611
poppero
macrumors member
 
Join Date: Jun 2009
Quote:
Originally Posted by jck1634 View Post
I'm cheating a little with the degree symbol. it's just echo o :P
i tried with echo even with char hex code but not provide the expected result...

UPDATE:
i found a regex for the symbol, this is the complete script for degrees only:
Code:
curl --silent "http://xml.weather.yahoo.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/[A-Z a-z]*, //' -e 's/\(.*\) F/\1 F/' -e 's/\(.*\) C/\1 C/' | tail -n1
I modified it to auto-fix both Celsius and Fahrenheit notation.
Note: you must remember to set the encoding to UTF-8!

This is my creation...


Last edited by poppero; Jan 12, 2010 at 11:28 AM.
poppero is offline   0
Old Jan 12, 2010, 11:41 AM   #1612
jck1634
macrumors regular
 
Join Date: Mar 2009
That looks great!

I'm so glad this is catching on!!
jck1634 is offline   0
Old Jan 12, 2010, 11:46 AM   #1613
MacDawg
macrumors P6
 
MacDawg's Avatar
 
Join Date: Mar 2004
Location: "Between the Hedges"
Quote:
Originally Posted by poppero View Post

This is my creation...

What font are you using for the time?
Thanks for the script!
Works like a charm!

Woof, Woof - Dawg
MacDawg is offline   0
Old Jan 12, 2010, 12:10 PM   #1614
jck1634
macrumors regular
 
Join Date: Mar 2009
Hey guys! I've uploaded the separator I'm using. It's been extracted from the original image. I added an inner bevel which adds the slight inner shadow to give it a bit of depth and then placed a small white transparent gradient to give the numbers a bit of gloss, again for a bit more depth.

Download

It's only one separator so you need to make two geeklets for the same image file and then just resize it over the numbers.

I think it works pretty well.

jck1634 is offline   0
Old Jan 12, 2010, 01:03 PM   #1615
oneijose
macrumors regular
 
Join Date: Jun 2009
Location: Brooklyn NY
Quote:
Originally Posted by jck1634 View Post
Hey guys! I've uploaded the separator I'm using. It's been extracted from the original image. I added an inner bevel which adds the slight inner shadow to give it a bit of depth and then placed a small white transparent gradient to give the numbers a bit of gloss, again for a bit more depth.

Download

It's only one separator so you need to make two geeklets for the same image file and then just resize it over the numbers.

I think it works pretty well.

Thanks dude.....U R THE MAN!!
oneijose is offline   0
Old Jan 12, 2010, 02:08 PM   #1616
poppero
macrumors member
 
Join Date: Jun 2009
Quote:
Originally Posted by MacDawg View Post
What font are you using for the time?
Eurostile
poppero is offline   0
Old Jan 12, 2010, 02:09 PM   #1617
MacDawg
macrumors P6
 
MacDawg's Avatar
 
Join Date: Mar 2004
Location: "Between the Hedges"
Quote:
Originally Posted by poppero View Post
Eurostile
Thanks!
May give it a try myself

Woof, Woof - Dawg
MacDawg is offline   0
Old Jan 12, 2010, 02:41 PM   #1618
jck1634
macrumors regular
 
Join Date: Mar 2009
I'm just going to write up a little guide for any beginners to Geektool who may want to have this on their desktop



Watch this video first, if your completely new to geektool

The First thing you'll need is the background which you can download here
Save the background image in a folder where you'll remember it is

Then to place the image onto your desktop just drag the image icon from Geektools preference pane on to your desktop


and then specify the location of the image inside the box above [set local path].
(or you could just click the button and find the image when the pop up box appears)

Now you should have the HTC background on your desktop


Place this anywhere on your desktop where you want the Geeklet to sit.

All the next commands are Shell commands.

Next thing to add would be the Hour and Minute.

Hour

Code:
date +%I
Minute

Code:
date +%M
Quick Tip: Make sure you use the center alignment on these two to make sure they stay in the middle of the white boxes

The City name is just a simple echo which just displays any text you want it to. So in this case...


Code:
echo YOURCITYNAME
On the other side we have the day, month and date.

Use this Script:
Code:
date +'%A, %b %d'
The script for this is:
Code:
date +%p
Lay these little geeklets over your background in whichever way you want. It doesn’t have to be the way I have it here

To get the weather for your city you need to first head over to Yahoo Weather and do a search for your city. Copy and save the URL for your city as you'll need it later.
Then, whilst on the page for your city's weather, hit the RSS button and the page will change to a feed page. In the URL for this page you'll see a code that’s all in uppercase. That’s your city code. Copy and save this next to your city URL as you will need this later aswell.

To get the current weather for your location

Current Weather Conditions You'll need this script:
Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=YOURCITYCODE&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>//' -e 's/, [0-9]* [A-Z]//' | tail -n1
Where it says YOURCITYCODE enter the uppercase code you found for your city previously.

To get the Temperature, Use this script:
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=UKXX0085&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/[A-Z a-z]*, //' -e 's/\(.*\) F/\1 F/' -e 's/\(.*\) C/\1 C/' | sed 's/ //' | tail -n1
The Next day Forecast, Use this script:
Code:
curl "http://xml.weather.yahoo.com/forecastrss?p=YOURCITYCODE&u=c" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/Hi\:\ \(.*\)\ Lo\:\ \(.*\)/\?Hi\: \1\  Lo\:\ \2/" | sed "s/\?\(.*\)/\\1/"
Again use the city code in place of YOURCITYCODE within each of the above scripts

To get the image for the weather for your city, Use this script:
Code:
curl --silent "WEATHER URL FROM YAHOO/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\
Paste the URL you saved of your city's weather in place of " WEATHER URL FROM YAHOO" The geeklet will be blank after you’ve done, but don't worry that’s normal.

To get the image to show up on your desktop use this script:
Code:
file:///tmp/weather.png
Now it's just a matter of placing everything the way you like it. Don't forget you can change the font style and sizes to whatever you prefer.

Once you've done that you just need to overlay the numbers with a set of separators to really finish it off.


You can download it from here

All you need to do with this is place it on your desktop as an image command in the same way you did with the background image. Only, for THIS image you have to do it twice using the same Separator image and place it over both the Hour and minute numbers. This gives the numbers a bit of shine and depth to really top it of.

Just wanted to say a big thank you to everyone in this thread. I couldn’t have done any of it without the scripts you clever people have so generously shared.

I hope you find this guide useful

Jai.

Last edited by jck1634; Sep 7, 2010 at 07:51 PM.
jck1634 is offline   0
Old Jan 12, 2010, 02:44 PM   #1619
MacDawg
macrumors P6
 
MacDawg's Avatar
 
Join Date: Mar 2004
Location: "Between the Hedges"
Quote:
Originally Posted by jck1634 View Post
You can download it from here
Exellent guide!
But your link is giving a 403 access error

Woof, Woof - Dawg
MacDawg is offline   0
Old Jan 12, 2010, 02:54 PM   #1620
jck1634
macrumors regular
 
Join Date: Mar 2009
Thanks! I've fixed the links.
jck1634 is offline   0
Old Jan 12, 2010, 02:56 PM   #1621
MacDawg
macrumors P6
 
MacDawg's Avatar
 
Join Date: Mar 2004
Location: "Between the Hedges"
Quote:
Originally Posted by jck1634 View Post
Thanks! I've fixed the links.
Got it!
Thanks again!

Woof, Woof - Dawg
MacDawg is offline   0
Old Jan 12, 2010, 04:05 PM   #1622
creator2456
macrumors 68000
 
creator2456's Avatar
 
Join Date: Jul 2007
Location: Chicago
Quote:
Originally Posted by jck1634 View Post
I hope you find this guide useful

Jai.
You can us this for the date all in one line.

date +'%A, %b. %d'

Probably want to set it to right align as well. That way when the length changes it 'pushes' to the center of the graphic and not out of the border.
Attached Images
 
__________________
I have stuff...but I am also lazy.
Buy some of my stuff!!!

Last edited by creator2456; Jan 12, 2010 at 04:11 PM.
creator2456 is offline   0
Old Jan 12, 2010, 04:15 PM   #1623
jck1634
macrumors regular
 
Join Date: Mar 2009
Thanks for that! I've updated the guide!
jck1634 is offline   0
Old Jan 12, 2010, 04:25 PM   #1624
codymac
macrumors 6502
 
Join Date: Jun 2009
In order to the get the forecast as it appears in jck1634's post, I did this:

Code:
curl --silent "http://weather.yahooapis.com/forecastrss?p=YOURCITYCODE&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/\?\(.*\)/\\1/"
replace YOURCITYCODE with your actual city code and the "f" at the end of the URL with a "c" if you prefer.
Attached Thumbnails
Click image for larger version

Name:	Picture 1.png
Views:	111
Size:	109.6 KB
ID:	210638  

Last edited by codymac; Jan 12, 2010 at 04:42 PM.
codymac is offline   0
Old Jan 12, 2010, 04:41 PM   #1625
Redfish123
macrumors newbie
 
Join Date: Sep 2009
Problem With Top output

I am having an issue with the top command in geektool v3 RC5. I am running snow leopard 10.6.2. My main problem is that when I run my command:

top -n 20 -l 1 | cut -c 1-28 | tail -21

The PID for top, cut, and tail each increase by a few each time it updates. the PID for Top might be 4015 but later in the day it is like 51450. If I change the refresh time this doesn't happen so fast, but I was wondering if there was anyway to run top through geektool where it is constantly updating like running it from the terminal. If I run it in the terminal the Top PID never changes vs. creating a new instance in geektool each time it refreshes.

Is there anyway to run top without this occurring?

Any help would be greatly appreciated.
Redfish123 is offline   0


Closed Thread
MacRumors Forums > Mac Community > Picture Gallery > UI Customization

Tags
background, desktop, geektool, time, wallpaper

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Geektool: Help with GeekTool? codyd51 UI Customization 0 Dec 6, 2013 07:01 PM
Geektool bodhi9 Mac Applications and Mac App Store 3 Apr 1, 2013 12:30 AM
Geektool: Your Geektool scripts (II) brenm666 UI Customization 10 Dec 5, 2012 10:55 AM
GeekTool Tander Mac Applications and Mac App Store 2 Dec 4, 2012 10:05 AM
Geektool on rMBP LeGacY X MacBook Pro 6 Jun 30, 2012 11:07 PM

Forum Jump

All times are GMT -5. The time now is 09:22 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC