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.
That second one that you want seems to be done on Mac OS X via geektool so I'd say it's definately doable. Not terribly difficult even, though it will be slightly time consuming to set up as you will have to have one or more scripts in each square.

First you would create the colored tiles, which to me could be done one of two ways. In Photoshop just create a cool background that looks just like that one you wanted, its really just colored arranged blocks (of course the downside of this is you can't go changing wallpapers all the time as the squares would be the wallpaper). So alternatively and a slightly better idea would be to use geektool to create colored blank boxes (by either displaying colored image files or by creating an empty shell command and changing its background to a solid color thereby replicating the blocks) and align them how you like on your desktop.

Once you have the background blocks sorted you would create a bunch of geektool scripts and then position them in the way that replicates that Windows setup. So say create one for CPU info and throw it in the top left one, create a RAM info one to put in the block below that, grab an iTunes script and throw it in the next block and so on.

So yes it is doable but with a bit of effort.

thank you!!! ill have to spend a weekend when im not doing anything.
 
Guys and gurls,

I would like to use the percentage of battery level to define the percentage of opacity of an extra white layer on my desktop. In that way; when the battery gets drained my original dekstop is getting more vague.

I found something like a similar solution on the forum, but i don't know how to code this furthermore....


So basicly; grab thje battery status,but don't display it, but save it to disk somewhere. Step 2 would be changing opacity of one layer and display that file...

Any help???



Getting the weather image is a 2 step process
The first is a shell script that grabs the image (but you see no output, it puts the image on your drive)
The second step you use the image shell to get that image and display it

Step 1
Image grab
Got to Yahoo Weather and put in your zip code
When the page loads with your weather, copy that URL
Use this code in a shell script, but past your URL instead (keep the quotes around the URL)
You won't see any output from this

Code:
curl --silent "YOUR_YAHOO_URL_ADDRESS" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /var/tmp/weather_image.png\

Step 2
Image display
In another geeklet, use this code to display the image
Code:
file://localhost/var/tmp/weather_image.png
 
I've been trying to find a decent Magic Mouse battery life display for a while now, but none of the ones I've found have worked properly, or worked at all. So I've taken a script by deyno1903 a few pages back and distilled it down to just the battery percentage or "disconnected", and so far it's working pretty well;
Code:
mbatt=`ioreg -c BNBMouseDevice | grep Percent | tail -1| awk '{print $9}'`;

if [ ${#mbatt} -lt 1 ]; then
echo "Magic Mouse: disconnected"
else
echo "Magic Mouse Battery: $mbatt%"
fi
 
Just wondering if you'd mind sharing the specific details of this part of your script, specifically how you get the status of handbrake encoding to be output to geektool - really awesome stuff!

3) The section on the bottom host a custom applescript app I made to add RSS subscriptions for TV shows to "Automatic" and the folder to process artwork for said TV shows. Below it the like of type you cane barely make out is the status of handbrake cli which has been set in motion by an automator action. It's much easier to make out at full 2560x1440 ;)
 
I just noticed that Geektool Helper is using 3.28gb of RAM. Why would it be using that much? I didn't notice it because I have 16gb, but it's still too much.

I'm using the beta Lion build.
 
I just noticed that Geektool Helper is using 3.28gb of RAM. Why would it be using that much? I didn't notice it because I have 16gb, but it's still too much.

I'm using the beta Lion build.

No idea what would cause that, the only thing I've noticed that causes geek tool to start being resource heavy is when numerous shells are set to refresh every second :S what/how many geeklets are you using?

How do I install a .glet I downloaded that's already made?

Download the .glet file and open it from your downloads folder in the dock. Geektool should recognise it and ask if you want to use it.
 
Newb question here: An earlier post here gives the Applescript code to show the number of unread mail you have. You create the script and then call it in Geektook. The script works when I click the Run button in Applescript. It shows the correct result in the bottom window. I then save it as a scpt file. I then go to Geektook and select Shell and put in this code: osascript localhost/Users/Kevin/Desktop/mail.scpt.

The above doesn't work, and I don't know what I'm doing wrong. Any pointers?

On another note, I got the below working great.
 

Attachments

  • weather.png
    weather.png
    77 KB · Views: 4,154
Are there any scripts that shows the battery level of the Apple trackpad?

Somebody posted this a few pages back;
Code:
ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{print ("System Battery: ",$10/$5 * 100,"%")}';
osascript -e 'set a to do shell script "ioreg -w0 -l | grep Capacity"' -e "set h to word 5 of a" -e "set z to word 33 of a" -e "set b to word 38 of a" -e "set c to 1000 * b / z" -e "set d to round c" -e "set f to d / 10" -e "set q to 1000 * h / b" -e "set w to round q" -e "set j to w / 10" -e '"Battery Health: " & j &"%"' | iconv -f utf-8 -t ucs-2-internal;
ioreg -w0 -l | grep "Cycle Count" | awk 'BEGIN { FS = "=" } ; {print $8}' | awk 'BEGIN { FS = "}" } ; {print $1, "Cycles"}';

kbatt=`ioreg -c AppleBluetoothHIDKeyboard | grep BatteryPercent | tail -1|awk '{print $10}'`;

tbatt=`ioreg -c BNBTrackpadDevice | grep BatteryPercent | tail -1|awk '{print $10}'`;

mbatt=`ioreg -c BNBMouseDevice | grep Percent | tail -1| awk '{print $9}'`;

if [ ${#mbatt} -lt 1 ]; then
echo "Magic Mouse: disconnected"
else
echo "Magic Mouse Battery: $mbatt%"
fi
if [ ${#tbatt} -lt 1 ]; then
echo "Magic Trackpad: disconnected"
else
echo "Magic Trackpad Battery: $tbatt%"
fi
if [ ${#kbatt} -lt 1 ]; then
echo "Wireless Keyboard: disconnected"
else
echo "Wireless Keyboard Battery: $kbatt%"
fi

I managed to slim it down to just displaying the Magic Mouse battery level, I expect it's just as easy with the trackpad.
 
need a little help :>

Hey,
I'm really new and don't have much experience with Geektool or Shell. My Desktop look like this at the moment:



Uploaded with ImageShack.us
Have you any idea how I can 'nice it up' a little?


____
PS: sry about my bad english.
 
Sort downloads folder by date added

This shell script will essentially allow you to sort your downloads folder by date added. When an item is added to the downloads folder it changes the modified date and time to the current date and time. Set the folder to sort by modified date. I set the script to run every 1 sec. I initially tried a folder action but it caused my finder windows to annoyingly flash every time I opened or closed the downloads folder, so I use this instead. Hope it helps,

Code:
cd ~/Downloads ; IFS='\n'
if [ ! -f .before ] ; then ls > .before ; fi

ls > .now
cat .before .now | sort | uniq -u | while read new
do
	touch -c "$new"
done

(stat -f "%B %N" * | grep '753549904' | sed s/"-753549904 "//g & cat .now ) | sort | uniq -u > .before

Just thought of this, if you want to display the files that have been recently added or downloaded for a growl like display, you can add this to the end of the script:

Code:
display_seconds=6
(ls & find . -mtime -"$display_seconds"s -exec basename {} \;) | sort | uniq -d
echo
 
Last edited:
Countdown Timer; months;day;hours;mins;secs ??

I am new to the MAC world and recently found this Geektool app. I love it. What I am wanting to know is does anyone out there know how would i create a timer that counts down literally from 12 months away giving me the same countdown like on this website:

http://www.timeanddate.com/counters...day=29&year=2012&hour=21&min=00&sec=00&p0=137

Thanks in advance if anyone can help . . .

Golfnut007 ;)
 
Download the .glet file and open it from your downloads folder in the dock. Geektool should recognise it and ask if you want to use it.

It tells me Geektool can not open this file or something. No matter what .glet I try it tells me this. I'm on 10.7.1. I added a screenshot.

dbox.jpg
 
Last edited by a moderator:
HTML script help

I'm trying to read the text of the verse of the day from http://www.biblegateway.com/votd/get/?format=atom&version=NIV . So far using the code:

curl --silent "http://www.biblegateway.com/votd/get/?format=atom&version=NIV" | grep -E '(</content>)'| sed -e 's/<\/content>//'

I've got it outputting the verse text, but it comes out with some jibberish at the beginning and end that I don't know how to remove.

I'm pretty much a shell scripting newb so any help is really appreciated!

Also here is a screenshot of my desktop so far:
 

Attachments

  • Screen shot 2011-08-29 at 1.47.26 AM.jpg
    Screen shot 2011-08-29 at 1.47.26 AM.jpg
    805.3 KB · Views: 291
Never mind guys I just got it working. Guess I just needed to sleep on it to get the syntax right
 

Attachments

  • Screen shot 2011-08-29 at 12.44.30 PM.jpg
    Screen shot 2011-08-29 at 12.44.30 PM.jpg
    798.1 KB · Views: 211
Geektool

Geektool's in the Mac App Store! How's your geektool setup?
Yes, I know. Mine looks like the one in the example on the App Store - I really liked it.
 

Attachments

  • Screen Shot 2011-08-30 at 9.49.02 PM.png
    Screen Shot 2011-08-30 at 9.49.02 PM.png
    996.8 KB · Views: 251
Mines is very simple ... Although I would like to change the 3 month calendar to show the current on top and the next two below. I really don't have any need to glance at the last month that past. Does anyone know what changes to make? ...... I took a pic instead cause some of the characters come out funny when I copy n paste.

113124
 

Attachments

  • 2011-08-30 10.52.10 pm.jpg
    2011-08-30 10.52.10 pm.jpg
    85.6 KB · Views: 329
Help

I am new to Geektool and I cannot figure out how to get this script to work in the command part of the shell.

set info to ""
tell application "System Events"
set num to count (every process whose name is "iTunes")
end tell
if num > 0 then
tell application "iTunes"
if player state is playing then
set who to artist of current track
set what to name of current track
set onwhat to album of current track
set how to (time of current track)
set stars to (rating of current track) / 20 as integer
set info to (what & onwhat)
end if
end tell
end if
return info
end run

This works in applescript editor, but i cannont seem to get it to work in the command part of the shell in geektool. This will display iTunes song and album. What step and i missing?
 
I'm new to the Mac world and geektool. I absolutely LOVE both. I used to make layouts for livejournal YEARS ago. I had to get used to coding again hah. :)
I've had geektool for a couple of days, and this is what I've done so far. I think it's an okay start for me just getting back into coding. The weather was definitely the most difficult for me. I'm still trying to figure out how to get the image of the sun/clouds/etc on there.
 

Attachments

  • Screen shot 2011-08-31 at 1.18.31 AM.jpg
    Screen shot 2011-08-31 at 1.18.31 AM.jpg
    164 KB · Views: 283
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.