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.
hey there!
i just reached Geektool the other day
and i decided to make my own layout, it is my first try
i used scripts from other ppl but i think those are kinda universal
i made the wallpaper

hey ya from MXIKO!

comment plz!

btw...im having a problem with the shell boxes since they are kinda cropping my fonts, i dont know how 2 fix that lol, if someone knows how to or can figure it out, i would appreciate it badly
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    95 KB · Views: 238
Last edited by a moderator:
open the Applescript Editor (in Applications/Utilities)
copy paste the script and save it somewhere (~/Geektool/scriptVLC.scpt for example)
then in geektool, type "osascript ~/Geektool/scriptVLC.scpt" without the quotation marks. and it should work.

I tried that and it still didn't work. If it makes a difference, I'm using Geektool 2.
 
That would be really awesome if someone could write a script that would get the system temperature and display the following for different temperatures:

120F and below :D
130F :p
140F :)
150F :|
160F :\
170F :(
180F :'(
190F >:[
200F X[
 
Another Geektool Desktop

Just wanted to thank everyone for their help in using Geektool. Did my first desktop back in April but was feeling the need for change and I think I did an even better job. So, here's my current desktop.

ipodtouchexample.jpg


On a normal iPod Touch, the top of the screen has your wifi strength, time and battery status. I decided this would be a perfect place to display the current song from iTunes. The wallpaper are pictures in a folder, some of famous people like His Holiness the Dalai Lama and Gandhi, but also some other iPhone wallpapers I really like. There is a translucent mask over this that is identical to the wakeup screen on the iPod displaying the time, day and date exactly as it is on the real iPod Touch. But where the slider is at the bottom, I've put the current temperature and weather conditions. And last, on the home button is listed the number of unread emails I have in my inbox. Simple but elegant - at least I think so.

ipodtouchdetaildetail.jpg


I listed all the scripts I used on my blog WanderingTheWorld.com

Thanks again. I couldn't have done it without the gang on this forum.

Jim bagsh
 
Here's my desktop. Using Geektool for the date, current weather, top labels, lines and in conjunction with icalBuddy for the calendar stuff. Bowtie is for itunes (Zukunft Condensed White theme) and WideScape weather for Yahoo Widgets for the forecast. Dateline for the date bar at the bottom.

Let me know what you think!

hey there! is see that you use the same yahoo widescape widget like I do. how do you lock the position of this widget? after every restart, it puts the widget to another position at my desktop. any ideas? thanks!
 
heres a cool script i found searching for a facebook RSS feed... (totally unrelated :eek:)
it puts the itunes artwork on your desktop! i've been wanting to do this forever!
Code:
-- Paths and stuff
set ArtworkFromiTunes to ((path to home folder) as text) & ¬
	"Pictures:iTunes Artwork:From iTunes:albumArt.pict" as alias
set iTunesArtwork to ((path to home folder) as text) & ¬
	"Pictures:iTunes Artwork:From iTunes:albumArt.pict"
set DefaultArtwork to ((path to home folder) as text) & ¬
	"Pictures:iTunes Artwork:Default:albumArt.pict"
set displayArtwork to ((path to home folder) as text) & ¬
	"Pictures:iTunes Artwork:albumArt.pict"

-- Unix versions of the above path strings
set unixITunesArtwork to the quoted form of POSIX path of iTunesArtwork
set unixDefaultArtwork to the quoted form of POSIX path of DefaultArtwork
set unixDisplayArtwork to the quoted form of POSIX path of displayArtwork

set whichArt to "blank"
tell application "System Events"
	if exists process "iTunes" then -- iTunes is running
		tell application "iTunes"
			if player state is playing then -- iTunes is playing
				set aLibrary to name of current playlist -- Name of Current Playlist
				set aTrack to current track
				set aTrackArtwork to null
				if (count of artwork of aTrack) ≥ 1 then -- there's an album cover
					"Running and playing and art"
					set aTrackArtwork to data of artwork 1 of aTrack
					set fileRef to ¬
						(open for access ArtworkFromiTunes with write permission)
					try
						set eof fileRef to 512
						write aTrackArtwork to fileRef starting at 513
						close access fileRef
					on error errorMsg
						try
							close access fileRef
						end try
						error errorMsg
					end try
					
					tell application "Finder" to ¬
						set creator type of ArtworkFromiTunes to "????"
					set whichArt to "iTunes"
				end if
			end if
		end tell
	end if
end tell

if whichArt is "iTunes" then
	do shell script "ditto -rsrc " & unixITunesArtwork & space & unixDisplayArtwork
else
	do shell script "ditto -rsrc " & unixDefaultArtwork & space & unixDisplayArtwork
end if

its in AppleScript and you have to do a few steps before it works (make a folder in ~/Pictures)
more info here! http://www.leancrew.com/all-this/2007/06/album-art-with-geektool/

still havent found anything on a facebook geeklet... :(
so if you have something that actually works, let me know! (and that doesnt use automator...)
 
Last edited:
That would be really awesome if someone could write a script that would get the system temperature and display the following for different temperatures:

120F and below :D
130F :p
140F :)
150F :|
160F :\
170F :(
180F :'(
190F >:[
200F X[

Got bored and figured this out for you. You do need to have the smc.custom file from the zip file talked about at this blog entry copied to your system for this to work (the link to the zip file is actually in the comments).

Copy the following code and update the path to smc.custom in the python code. Name saved code as cputempsmilie.py (or whatever you want to call it) and chmod +x the file to make it executable.
Code:
#!/usr/bin/env python

# based off of matchtemp.py from R0SSAR00
# at http://www.r0ssar00.com/2009/03/geektool.html
# i really only used the re command

# module imports
import re, shlex, subprocess

# get our command line argument in a list for
# modify based on your system and where you put smc.custom
cmd = "/path/to/smc.custom -k TC0D -r" 
cmd = shlex.split(cmd)

# get the data from the command we want to run
smcdata = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]

# regex to parse the smc.custom output
match = re.search(r".*:::(\d*):::", smcdata)
if match:
	cputemp = match.group(1)
else:
	cputemp = ""

# figure out smile based on cpu temp
if int(cputemp) <= 120:
	smile = ":D"
elif int(cputemp) > 120 and cputemp <= 130:
	smile = ":P"
elif int(cputemp) > 130 and cputemp <= 140:
	smile = ":)"
elif int(cputemp) > 140 and cputemp <= 150:
	smile = ":|"
elif int(cputemp) > 150 and cputemp <= 160:
	smile = ":\\"
elif int(cputemp) > 160 and cputemp <= 170:
	smile = ":("
elif int(cputemp) > 170 and cputemp <= 180:
	smile = ":'("
elif int(cputemp) > 180 and cputemp <= 190:
	smile = ">:["
elif int(cputemp) > 190 and cputemp <= 200:
	smile = "X["
elif int(cputemp) > 200:
	smile = "HOSED"

# print the data
# customizable!
print "CPU: "+cputemp+" "+smile

Set your geektool command to run the python script created above.
 
Last edited:
Hi,
I like what I've done with Geektool. The only thing I've never gotten to work right is getting mail. I started it at one point and then forgot about it. I was using a script of some sort. Well I'd like to get rid of whatever I did start and then maybe start from scratch another time.

As it is right now I have Terminal telling me "You have mail." everytime I open it. How can I get rid of this? All the mail is just old reminders about SuperDuper that's been delete for some time.

Thanks for any help.
 
Just wanted to thank everyone for their help in using Geektool. Did my first desktop back in April but was feeling the need for change and I think I did an even better job. So, here's my current desktop.

...

Thanks again. I couldn't have done it without the gang on this forum.

Jim bagsh

Amazing work. How did you get the changing wallpaper and the translucent clock and slider area?
 
As it is right now I have Terminal telling me "You have mail." everytime I open it. How can I get rid of this? All the mail is just old reminders about SuperDuper that's been delete for some time.

Have you actually read that mail? [just type mail in Terminal (and see man mail for more details).] Because —when Terminal says we have "mail" —it's oftentimes coming from the error stream of some script that's misbehaving (or basically dissatisfied with something).
 
Hal, Yes I did read the mail. It was from SuperDuper reminding me that it couldn't do a backup. I got rid of SD a while back.
 
Thanks to everyone on here who posted their setups & scripts –*here's what I've applied to my work machine:

Secondary on the left, primary display on the right.

Uses date, weather and sunset scripts, all in Myriad Pro lowercase.

Hey, I saw DiskTracker in your Dock screenshot! My life would be a lot less productive without DiskTracker every day of the week.

:)
 
Here's my desktop. 2560x1600.

- Calendar is REMIND. ( /usr/local/bin/rem -w200,5 -c2 )
- seconds above the time
- i had stocks once, red when down, green when up, but i've replaced it with temperature instead. I have that refreshing every 30 minutes.
- i'm getting older so i need nice BIG numbers
- i've had other things like itunes track, weather images, traffic cams, but this is my favorite layout so far
 

Attachments

  • candi_desktop.jpg
    candi_desktop.jpg
    200.5 KB · Views: 464
Alright, I have a quick question about an E-mail Script. I currently use the script:
echo 'tell application "Mail" to return unread count of inbox as string & " UNREAD E-MAIL"' | osascript | grep -v '0'

This is all well and works fine. My question is if I can get a notification to pop up when I have an unread email, but only displays the word E-MAIL, with NO number count. What I'm trying to do is emulate a popular icon set that I'm using so that the notification flows better with my dock and the icons. I've attached an image of my latest desktop customization. As you can see in the bottom right corner I am using Geektool to display the time and underneath that I have basic text saying CLOCK. I want to basically do the same thing on the opposite side with my unread email. Have it say 1 UNREAD then underneath have it say E-MAIL. The only problem is that I either need to have the E-MAIL sit there permanently like CLOCK as basic text, or have it say 1 UNREAD 1 E-MAIL.

Is there anyway I can get just the word E-MAIL to display once a new email is recieved.

Screenshot2010-11-20at120203AM.png
 
Last edited by a moderator:
Alright, I have a quick question about an E-mail Script. I currently use the script:


This is all well and works fine. My question is if I can get a notification to pop up when I have an unread email, but only displays the word E-MAIL, with NO number count. What I'm trying to do is emulate a popular icon set that I'm using so that the notification flows better with my dock and the icons. I've attached an image of my latest desktop customization. As you can see in the bottom right corner I am using Geektool to display the time and underneath that I have basic text saying CLOCK. I want to basically do the same thing on the opposite side with my unread email. Have it say 1 UNREAD then underneath have it say E-MAIL. The only problem is that I either need to have the E-MAIL sit there permanently like CLOCK as basic text, or have it say 1 UNREAD 1 E-MAIL.

Is there anyway I can get just the word E-MAIL to display once a new email is received.


If this doesn't work it will provide a good start for you.

1) Create an AppleScript using the following code
Code:
tell application "System Events" to set iCalIsRunning to (name of processes) contains "Mail"
set finalText to ""
if iCalIsRunning then
	tell application "Mail"
		set unreadCount to unread count of inbox
		if (unreadCount is greater than 0) then
			return "E-MAIL"
		else
			set finalText to ""
		end if
	end tell
else
	set finalText to "OFF"
end if
*E-MAIL is displayed any time an unread email is present. If Mail is running and there are no unread emails, nothing will be displayed. If Mail is not running, OFF will be displayed.

2) save the script
3) create a new geeklet
Code:
osascript [I}path/to/script/nameofscript.scpt[/I}
 
I am trying to put a weather image onto my desktop (I have had this before, but it seems not to be working all of a sudden). The codes I am using are

1. to get the image
Code:
url --silent "http://weather.yahoo.com/forecast/UKXX0112.html" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png

2. To display the image, an image file with the location
Code:
file:///tmp/weather.png

Both are set to 1s refreshes, but nothing seems to be happening, any ideas guys?
 
I am trying to put a weather image onto my desktop (I have had this before, but it seems not to be working all of a sudden). The codes I am using are

1. to get the image
Code:
url --silent "http://weather.yahoo.com/forecast/UKXX0112.html" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather.png

2. To display the image, an image file with the location
Code:
file:///tmp/weather.png

Both are set to 1s refreshes, but nothing seems to be happening, any ideas guys?
Your first problem is the code to get the webpage image, replace url with curl.

Your second problem is the 1s refresh on the code to pull the webpage down; the yahoo servers will block you eventually due to the number of requests you are asking for. I would set it so 10 minutes or so.
 
If this doesn't work it will provide a good start for you.

1) Create an AppleScript using the following code
Code:
tell application "System Events" to set iCalIsRunning to (name of processes) contains "Mail"
set finalText to ""
if iCalIsRunning then
	tell application "Mail"
		set unreadCount to unread count of inbox
		if (unreadCount is greater than 0) then
			return "E-MAIL"
		else
			set finalText to ""
		end if
	end tell
else
	set finalText to "OFF"
end if
*E-MAIL is displayed any time an unread email is present. If Mail is running and there are no unread emails, nothing will be displayed. If Mail is not running, OFF will be displayed.

2) save the script
3) create a new geeklet
Code:
osascript [I}path/to/script/nameofscript.scpt[/I}


Thanks for the confidence but I'm not familiar with writing scripts at all. So I'm not quite sure how to change this one since it's not working. The applescript seems to work fine, (first time writing an applescript so I may be wrong.) I copy and pasted what you wrote and when I hit run the bottom displayed "EMAIL" which I assume meant it worked fine. Once I plugged the second part into geektools though nothing showed up when I had an email. I did replace the path with the path to the script. I'm not quite that new to all this. Not sure where the problem lies.

EDIT: Got it working the "Set Locale Environment" box was ticked. Turning it off solved the problem and the script works fine now.
 
Last edited:
Your first problem is the code to get the webpage image, replace url with curl.

Your second problem is the 1s refresh on the code to pull the webpage down; the yahoo servers will block you eventually due to the number of requests you are asking for. I would set it so 10 minutes or so.

My mistake - I miscopied the Curl, but it has been blocking it since the first attempt...

Still isn't working though - I'm now at 300s refresh rate, briefly displayed a totally different image but stopped working again when I re-entered the code.
 
Last edited:
Thanks for the confidence but I'm not familiar with writing scripts at all. So I'm not quite sure how to change this one since it's not working. The applescript seems to work fine, (first time writing an applescript so I may be wrong.) I copy and pasted what you wrote and when I hit run the bottom displayed "EMAIL" which I assume meant it worked fine. Once I plugged the second part into geektools though nothing showed up when I had an email. I did replace the path with the path to the script. I'm not quite that new to all this. Not sure where the problem lies.

EDIT: Got it working the "Set Locale Environment" box was ticked. Turning it off solved the problem and the script works fine now.

Glad you got it working. Strange that it didn't work right away as all I did was change the script I have running to show what you wanted it to. Nothing was changed to the actual functions being used.
 
I fixed my first issue by re-reading a guide to geektool I found somewhere, it works just fine now - thanks for your help guys.

I have a second query, is it possible to write a script that changes position if an external display is connected? I have my cinema display as my main display at home, and when I use my laptop without it, I lose my time & battery info due to their position on the far right of my screen.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.