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.
Hi guys,

Can i ask you question? IS there any way when you post the pictures of your geektool desktops but the whole pack of what is needed to make it look like this?

For example I just got geektool install and know nothing about it, but I do like quite a few desktops here, and would like to have one myself. Anyone can share the whole package not just a screenshot? I would happily did if I had the experience.

Thank you
 
Hi guys,

Can i ask you question? IS there any way when you post the pictures of your geektool desktops but the whole pack of what is needed to make it look like this?

For example I just got geektool install and know nothing about it, but I do like quite a few desktops here, and would like to have one myself. Anyone can share the whole package not just a screenshot? I would happily did if I had the experience.

Thank you

i think mr.google is your best friend right now .
 
IS there any way when you post the pictures of your geektool desktops but the whole pack of what is needed to make it look like this?

I understand this question to be answered with this thread, there are numerous scripts and commands for you to put into Geektool. All of the scripts I've posted to this thread contain instructions for use.
 
Label Count

Does anyone know how to display a count of all the files in a directory that have been labeled a specific color in the finder? I've tried this:

mdfind -count -onlyin /Volumes/Media/Comics "kMDItemFSLabel == 2"

For some reason, the displayed number changes every refresh even though the number of labeled files has not. Any suggestions?
 
Yahoo weather

Anyone else notice Yahoo's weather page always gives out the forecast as 'fair'? Every day is the same :)

EDIT: Ignore me, its finally changed!
 
Last edited:
Could anyone possibly make me a CNN RSS news feed script of some sort? I've tried to make one with an old yahoo canada top news .sh file I got online somewhere but when I put a new rss link in the .sh file the output never works perfectly and comes out like shown in the picture I attached. I'd also prefer for the output not to be double spaced as it is now if that's possible. Also, the little "CNN.com brings you up to date news..." bit above the output is really not necessary and I'd like that gone too. Thanks to anyone who gives this a shot

This is the current .sh file code that I'm using with the CNN RSS link
Code:
#!/bin/sh

URL="http://rss.cnn.com/rss/cnn_topstories.rss"

if [ $# -eq 1 ] ; then
  headarg=$(( $1 * 2 ))
else
  headarg="-8"
fi

curl --silent "$URL" | grep -E '(title>|description>)' | \
  sed -n '4,$p' | \
  sed -e 's/<title>//' -e 's/<\/title>//' -e 's/<description>/   /' \
      -e 's/<\/description>//' | \
  sed -e 's/<!\[CDATA\[//g' |            
  sed -e 's/\]\]>//g' |         
  sed -e 's/<[^>]*>//g' |      
  head $headarg | sed G | fmt

Do you mind to share all info about your Mac's dock? I really want it. No icons and nice font. Great artist...
 
Currently Playing Apple Script

I wrote an Apple script that:

1. returns the name of the current playing track in iTunes or Spotify (or both if both are playing!)
2. stores the album art in an image file so you can use it in GeekTool

Most implementations only work with iTunes, my implementation works with iTunes and Spotify, even if they are playing music both at once. iTunes will always overrule the album art when both iTunes and Spotify are playing, but that will probably rarely be the case. I run the script at a 10 second interval which does not seem to cause any issue on my 2010 MacBookPro5,3.

I am hosting the project on github (direct download).

How to use it:
1. create a 'Shell' geeklet with the following Command and have it refresh every 10 seconds:
(replace '~/path/to/script' with the path where you stored the script)
osascript ~/path/to/script/currentlyPlaying.scpt
2. create an 'Image' geeklet with URL:
(make sure you replace 'yourusername' with your username / the name of your home folder)
file://localhost/Users/yourusername/albumArt.tiff

ps. I use the Helvetica Neue Ultralight font for displaying the track information
 

Attachments

  • Screen Shot 2012-06-06 at 12.51.43 AM.png
    Screen Shot 2012-06-06 at 12.51.43 AM.png
    387.8 KB · Views: 284
  • Screen Shot 2012-06-06 at 1.08.10 AM.png
    Screen Shot 2012-06-06 at 1.08.10 AM.png
    52.3 KB · Views: 215
  • Screen Shot 2012-06-06 at 1.08.36 AM.png
    Screen Shot 2012-06-06 at 1.08.36 AM.png
    74.9 KB · Views: 209
  • Screen Shot 2012-06-06 at 1.13.56 AM.png
    Screen Shot 2012-06-06 at 1.13.56 AM.png
    314 KB · Views: 214
Last edited:
Does someone know where to find the right "thing" to do in order to get twitter working?

What do you mean exactly, read a twitter feed? You could use curl together with sed (examples for news feeds and weather feeds in other posts in this thread) to strip unwanted information out of it...
 
What do you mean exactly, read a twitter feed? You could use curl together with sed (examples for news feeds and weather feeds in other posts in this thread) to strip unwanted information out of it...

I manage it to work. This is what I got:


This geeklet executes the following command :
#!/usr/bin/osascript

set ShowTweets to 8

on replace_chars(this_text, search_string, replacement_string)
set text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
return this_text
end replace_chars

set esc to ASCII character 27
set nl to ASCII character 10
set output to nl

tell application "System Events"
set myList to (name of every process)
end tell

if myList contains "Twitter" then
tell application "Twitter"
repeat with s from 1 to ShowTweets
set _text to my replace_chars(display text of status s of home timeline of the current account, nl, " ")

set _auth to name of author of status s of home timeline of the current account
set r to retweeter of status s of home timeline of the current account
if r is not missing value then
set _retweet to _auth
set _auth to name of retweeter of status s of home timeline of the current account
end if

-- if s mod 2 = 0 then
-- set _auth to esc & "[1;31m" & _auth & esc & "[0m"
-- else
set _auth to esc & "[1m" & _auth & esc & "[0m"
-- end if


if r is not missing value then
set output to output & " " & _auth & " - RT " & _retweet & " " & _text
else
set output to output & " " & _auth & " - " & _text
end if

set output to output & nl
end repeat
end tell

output
else
"Twitter is not running"
end if
Are you sure you want to run it?


Looks like twitter has to be open in the background.Anyway works just fine.
:D
 
Did you have any luck with the BBC weather site? Thanks

Haven't gotten around to it yet, lots of stuff has been going on that's been keeping me from scripting. Hopefully things will calm down here by the end of this week so I can devote some time to the script.
 
hello, probably already been covered but..
I've got a weather image from a post, but i can't find one for Temp (degrees C) and description of weather, could somebody send me the exact code to put in the shell

pretend your taking to a 5 year old and i might just be able to understand :) (no experience with this programming lark)

Many Thanks
 
hello, probably already been covered but..
I've got a weather image from a post, but i can't find one for Temp (degrees C) and description of weather, could somebody send me the exact code to put in the shell

pretend your taking to a 5 year old and i might just be able to understand :) (no experience with this programming lark)

Many Thanks

Try

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

Obviously change the locationcode for yours.

HTH
Gr4z
 
Why? Open DashBoard HTC Text Hide in Back

I'm just going to write up a little guide for any beginners to Geektool who may want to have this on their desktop

Image

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
Image

and then specify the location of the image inside the box above [set local path].Image
(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

Image
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
Image
Code:
[B][I]date +%I[/I][/B]

Minute
Image
Code:
[B][I]date +%M[/I][/B]

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...

Image
Code:
[B]echo [I]YOURCITYNAME[/I][/B]

On the other side we have the day, month and date.

Image Use this Script:
Code:
[B][I]date +'%A, %b %d'[/I][/B]

Image The script for this is:
Code:
[B][I]date +%p[/I][/B]

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 Image You'll need this script:
Code:
[B][I]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[/I][/B]

Where it says YOURCITYCODE enter the uppercase code you found for your city previously.

To get the Temperature, Image Use this script:
Code:
[B][I]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[/I][/B]

The Next day Forecast, Image Use this script:
Code:
[B][I]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/"[/I][/B]

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, Image Use this script:
Code:
[B][I]curl --silent "WEATHER URL FROM YAHOO/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png\[/I][/B]

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:
[B][I]file:///tmp/weather.png[/I][/B]

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.
Image

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.

Hi Sir.

Why Call DashBoard widget. HTC Text Hide in Back. Picture Layer in Top

Refresh ALL, Back to Normal.

Please Help. ThankS.

OSX 10.7.4
Geektool 3.0.3
 
Disk Activity Scripts

This is a pair of scripts that together get the disk activity - as in bytes read/written per second, not total bytes read/written and not disk usage.

The first script gets the actual info:

Code:
#!/bin/sh

sudo -S iotop -C 1 1 <<EOF
[I]PutYourAdminPasswordHere[/I]
EOF

Replace PutYourAdminPasswordHere with your admin password, since iotop needs admin privileges to run.

The second script calls the first and parses the output. This script assumes the first script is called rawdisk.sh and is in the user's home directory:

Code:
#!/bin/sh

# get the current number of KB/sec read and written
sample=(`$HOME/rawdisk.sh | /usr/bin/awk "/disk_r/"'{print $8" "$11; exit}'`)

# print the sample
/usr/bin/printf "R:\t\t%d Kb/sec\nW:\t\t%d Kb/sec\n" ${sample[0]} ${sample[1]}
 
Here's my latest, if anyone wants to know anything just ask.
 

Attachments

  • screen-capture.jpg
    screen-capture.jpg
    314.4 KB · Views: 743
May I ask how you made your dock look this way?
I would like to do this to my dock as well!

It's a combination of the following:
1. Mirage.app to make the dock clear
2. TinkerTool to move the dock to the left side of the screen
3. Nerdtool to create an opaque bar
4. The dock spacers are a trick I found, but cannot remember where on the internet that was. These are the dock spacers that are not a 3rd party solution, they're provided by Dock.app itself.
5. The CPU and Fan info are scripts that are running in Nerdtool, but my setup requires the use of a special file that I don't think works on newer Macs.

I'm still running Snow Leopard on a 32bit Core Duo machine, so I have no idea if the apps I've mentioned are available for Lion.
 
Import to Lion

I recently upgrade to a new MBP and I am trying to get my geeklets over to the new machine. I am going from snow leopard (10.6.8) using geek tools from app store. Going to Lion (10.7.4).
I tried to copy /Library/Preferences/org.tynsoe.geeklet* (5 total files) to the new machine. No luck.
Also tried to export an individual script (i.e. date) and then with Geektools open I tried to open the file. It says it can't read yet.

Any thoughts? Rather not start over.

Thanks much!!

Jay
 
I would also like to know if it is possible to copy an entire GeekTools setup from one machine to the other.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.