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.
Basically, what I want to display the days of the week using the appropriate Kanji. So a script that checks the day, then returns the appropriate kanji. I think it's possible, and it doesn't seem complicated, but I don't know how to code.

Here is your code; maybe you have to change the German days to English ones :cool:

date "+%A" | sed -e 's/Montag/月/g' -e 's/Dienstag/火/g' -e 's/Mittwoch/水/g' -e 's/Donnerstag/木/g' -e 's/Freitag/金/g' -e 's/Samstag/土/g' -e 's/Sonntag/日/g'
 
I call this one "Urban Decay"


Screenshot2011-03-15at.png
 
Last edited:
Is there a script that shows random pictures from iPhoto ?

image geeklet, for the file, select the iPhoto Library in User/Pictures/, set Random Picture from Directory. you cant select a specific folder doh: all your iphoto's pictures are selected.
 
gcalcli not working with geektool

hey there, been following for a while, first time posting

i've been running gcalcli out of my terminal just fine. i've also been using geektool (for a while) without issue. for some reason, i cannot run gcalcli through geektool....it just wont show up! i've tried the following:

Code:
gcalcli agenda
/usr/local/bin/gcalcli agenda
~/usr/local/bin/gcalcli agenda
python /usr/local/bin/gcalcli agenda
python ~/usr/local/bin/gcalcli agenda

and i tried writing a shell script:

Code:
#!/bin/sh

python /usr/local/bin/gcalcli agenda

which runs fine in Terminal but will not show up in Geektool.

OS X 10.4, Python 2.7.1, Geektool 2 (latest of the 2 series, whichever it is), and gcalcli 1.4

any help?

p.s. i didnt include a screenshot because, well, it's a blank screen on my desktop (and works perfectly fine in my Terminal)
 
Disable debug log?

Does anyone here know how to disable the debug log in Geektool 3? I want to prevent it from crapping all over my system log.
I've looked at the plists and have been unable to find any switch.

regards,
MAJ
 
Help with Geektool

Hello,

I just upgraded from Geektool2 to Geektool3. Unfortunately after the upgrade, my old scripts not only do not show up in Geektool3, but they also still appear on my screen. Does anyone know how I can find where these are stored on my computer to either edit them in Geektool3, or delete them so they do not show up anymore?

I found some of the Geektool preferences in Users/[user name]/Library/Preferences/ however, renaming the files so the program couldn't find them did nothing, and I am pretty sure they are files set up by Geektool3 not Geektool2.

Thanks!!
 
image geeklet, for the file, select the iPhoto Library in User/Pictures/, set Random Picture from Directory. you cant select a specific folder doh: all your iphoto's pictures are selected.

Isn't there a way (script maybe) that the pictures get chosen randomly and change every "insert number" minutes ?
 
I've been using the following meter to show my RAM usage:

myRAM=`top -l 1 -F -R | awk '/PhysMem/ {print "" $8+0}'`
totalRAM=2048
myPercentRAM=`expr $myRAM \* 100 / $totalRAM`
declare -i a=5
while [ $a -lt $myPercentRAM ]
do
echo "|\c"
a=`expr $a + 5`
done
echo "\033[1;31m|\033[0m\c"
while [ $a -lt 100 ]
do
echo "\033[1;30m|\033[0m\c"
a=`expr $a + 5`
done
echo "\n"
unset myRAM
unset myPercentRAM
unset a

However, it shows inactive memory as "used." Does anyone know how to tweak the script so that it only counts wired and active memory? Otherwise, after my computer's been on for a while, the meter pretty much just sits at full all of the time.
 
I have searched all through this thread and cannot find a yahoo weather code that works. Can anyone help me?

Here is the code I'm trying to use:

curl --silent "http://weather.yahoo.com/united-states/texas/plano-12790372/" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's///' -e 's/<\/description>//'


Edit 2:
I figured it out!
 
Last edited:
I finally got one done....

Now I wanna figure out how to display itunes info such as current song and album art. If anyone knows how let me know, some of the codes look kinda tough to enter.
 

Attachments

  • Screen shot 2011-03-24 at 9.38.31 PM.jpg
    Screen shot 2011-03-24 at 9.38.31 PM.jpg
    124.6 KB · Views: 208
Can someone help me figure out how to get the yahoo weather image to update. I set the refresh rate to 300 seconds, and everything else in the weather seems to update except the image. What am I doing wrong? Its 8:30 and cloudy and I am stuck with a Moon and clouds. Yahoo weather just shows clouds :(
 
pdrolvra

I really like your background and setup. Where did you get that wallpaper?
(oops: is it just a black background with a clock in the middle?)
 
Last edited:
Geektool won't display weather

Hope i'm in the right forum.

I am starting to get frustrated here, I can't get geektool to actually show my weather output anymore.

I'm using this code for my shell script:
Code:
curl --silent "MY_AREA_URL_IS_IN_HERE" | grep "forecast-icon" | sed "s/.*background\\:url(\\'\\(.*\\)\\')\\;\\ _background.*/\\1/" | xargs curl --silent -o /tmp/weather.png

And when I check my /tmp folder, the weather.png file is in there, and has the correct image (refreshes at the rate that it should be and everything).

So I know that code is right.

Then for my image script, I have:
Code:
file://tmp/weather.jpg

And nothing shows.

If I set the image to pull from a static image elsewhere, it works fine. It will not pull from the weather image I have set. I've also tried to get the shell script to save to a different site, and that doesn't work either.

I'm completely stuck, and have no idea what I'm doing wrong. It should be noted when I originally set this up, it was working fine and then just randomly stopped working without me changing anything.
 
I finally got one done....

Now I wanna figure out how to display itunes info such as current song and album art. If anyone knows how let me know, some of the codes look kinda tough to enter.
Use Bowtie ;)
You can find it for free in the app-store, you can download themes in the app, some pretty nice themes in there!
Work beautiful for me!





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

Screen%20shot%202010-01-12%20at%207.38.17%20PM.png


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


and then specify the location of the image inside the box above [set local path].
screenshot20100114at747.png

(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

Background%20Screenshot.png

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

Code:
[B][I]date +%I[/I][/B]

Minute
Minute.png

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

City.png

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

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

Day%2C%20Month%20and%20Date.png
Use this Script:
Code:
[B][I]date +'%A, %b %d'[/I][/B]

Am%3APm.png
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
Current%20weather%20Conditions.png
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,
Temperature.png
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,
Next%20Day%20Forecast.png
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,
Weather%20Image.png
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.
Separator%20screenshot.png


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.

Ok, first of all, LOVE this tutorial, seriously, just started to use this program, and I love it!

But I have a small problem with the image of the weather to show up..
I put in a shell with the code as shown above;
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]

but what do I do then? I tried adding another shell or image with the file code, but it didn't work.. any help please? :)

Edit: before I forget to say it, I didn't forget to change the "WEATHER URL FROM YAHOO" to the weather url ;)

Result so far, would love to fix the image in it to make it complete! ;)
And i'm still looking for a few fun/usefull ones! ^^
http://i54.tinypic.com/2n8u3b6.png

Edit 2: Still not working :( Even tried with a vid tutorial.. only difference is that the tutorial used Geektool 2, and I have Geektool 3..
Any ideas what I can do?
 
Last edited:
Result so far, would love to fix the image in it to make it complete! ;)
And i'm still looking for a few fun/usefull ones! ^^
http://i54.tinypic.com/2n8u3b6.png

Edit 2: Still not working :( Even tried with a vid tutorial.. only difference is that the tutorial used Geektool 2, and I have Geektool 3..
Any ideas what I can do?

Have a look at post #2874 and my last one. It´s all in there! Try to read this thread completely. I´ve done it also when I started using Geektool. There are a lot of codes and tips listed.
 
Got mine up finally!
It's working like a charm! :D

Anyone have some more fun/usefull scripts? :D
Right now I have the standards.. Time, date, weather..

For music stuff I use Bowtie, so that's cool..

Any ideas for more nice scripts?

Edit: just to late heh
@ Avant, I have read the whole topic ^^
Finally it works now! :)
Searching for some fun/usefull scripts now to put on my desktop! ^^
 
Try this code: file://localhost/tmp/weather.png ;)
Look at your file extension !

Much thanks. Any idea why it would be working with the wrong code originally? It was working, I restarted my computer and then it stopped working. It's actually been working and stopped working later twice now, both times I've had to redo the codes to get it to work.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.