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.
I'm not horribly thrilled with my current layout, but it works for what it is. The stuff under the time and date is my Adium list, I just changed the background color to the same as the desktop and turned off the window shadow.

Anyone have any thoughts on making a calendar that doesn't require a monospaced font? I know it's probably somewhat unlikely, but I don't require a standard calendar layout necessarily.

jW
 

Attachments

  • geektool.png
    geektool.png
    495.1 KB · Views: 769
Does anyone know how to uninstall lynx? All I could find was that you delete /usr/local/bin/lynx, but that is from 2004 so I don't know how accurate it is. Is there anything else you do? Thanks
 
Google has been no help to me. This seems like a fairly simple question. Using the date command, is there any way to eliminate the zero-padded month number you get by %m?

Code:
date "+%m/%e/%y"

gives me 07/30/09 but I want 7/30/09. Why can't I figure this out?
 
Google has been no help to me. This seems like a fairly simple question. Using the date command, is there any way to eliminate the zero-padded month number you get by %m?

Code:
date "+%m/%e/%y"

gives me 07/30/09 but I want 7/30/09. Why can't I figure this out?

You can just remove the leading zero using sed, like this:

Code:
date "+%m/%e/%y" | sed 's/0*//'
 
Weather Image doesn't work

There needs to be a detailed definitive thread for geektools, at least the basic commands plus weather.

I just can't seem to get the weather image to work.

I'm using this php script:

Code:
<?php
/* Be Sure to replace CITYDATA in $url with your own city from Yahoo */

$url="http://weather.yahoo.com/forecast/USTX0617.html";

$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);

$divStart = "<div class=\"forecast-icon\"";
$strEnd = "'); _background-image/* */: none;";
$start = strpos($file_contents, $divStart) + 50;
$end = strpos($file_contents, $strEnd);
$length = $end-$start;

$imagepath=substr($file_contents, $start , $length);
$image=imagecreatefrompng($imagepath);


imagealphablending($image, true);
imagesavealpha($image, true);
header('Content-Type: image/png');
imagepng($image);
?>

storing it locally

in Geektools my command is: php /Users/anthonyle/bin/weather.php

but I keep getting this error in Geektools:
"Fatal error: Call to undefined function imagecreatefrompng() in /Users/anthonyle/bin/weather.php on line 19"

Any help would be greatly appreciated.
 
There needs to be a detailed definitive thread for geektools, at least the basic commands plus weather.

I just can't seem to get the weather image to work.

I'm using this php script:

Code:
<?php
/* Be Sure to replace CITYDATA in $url with your own city from Yahoo */

$url="http://weather.yahoo.com/forecast/USTX0617.html";

$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);

$divStart = "<div class=\"forecast-icon\"";
$strEnd = "'); _background-image/* */: none;";
$start = strpos($file_contents, $divStart) + 50;
$end = strpos($file_contents, $strEnd);
$length = $end-$start;

$imagepath=substr($file_contents, $start , $length);
$image=imagecreatefrompng($imagepath);


imagealphablending($image, true);
imagesavealpha($image, true);
header('Content-Type: image/png');
imagepng($image);
?>

storing it locally

in Geektools my command is: php /Users/anthonyle/bin/weather.php

but I keep getting this error in Geektools:
"Fatal error: Call to undefined function imagecreatefrompng() in /Users/anthonyle/bin/weather.php on line 19"

Any help would be greatly appreciated.

NEVERMIND! I figured it out, i had to install PHP GD and enable php on my computer.
 
Hey guys, inspired by a picture off lifehacker, I decided to totally redo my geektool layout. Thought I'd share. I'm including the before and after. If you get a chance let me know if you think it's an improvement or not.

Also, feel free to ask for any of the scripts. In case anyone's interested, I figured out a way to make stock quotes appear in red if they gone down and green if they've gone up - but didn't include it in this screenshot.

Can I have the script you used for the stocks quotes that change red and green? I think that's pretty awesome.
 
My monthly calendar changed to august days and dates but now it wraps because of not enough days along the top. Any help on the code would be appreciated.
aug.png

Code: cal | sed -e '1d' -e '2p;2p;2p;2p' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | sed "s/^/ /;s/$/ /;s/ $(date +%e) /\*$(date +%e)\*/"
 
First off I want to thank everyone for the scripts and inspiration. A month ago I didn't even know what Geektool was and now I always use it. Here are the two desktops I have made. I hope you like them.

Let me know if you want any of the scripts (I think I got most of them from this thread, but I might have branched off or edited them myself, I can't remember).
 

Attachments

  • Picture.png
    Picture.png
    238.1 KB · Views: 453
  • homer.png
    homer.png
    553.4 KB · Views: 424
GeekTool 3.0 doesn't seem to have Text Shadow anymore. Which sucks because I was hoping 3.0 would have more text shadow customizability (X, Y location, spread, color like CSS) instead we got none. I hope this was just an oversight. :(

It also doesn't work with any of my Lynx powered Weather scripts. What gives?

I am sticking with 2.x until 3.x is up to snuff.
 
So, what exactly would be the shell command to retrieve the information displayed here:
308cmjr.jpg


Either as one command or four separate ones. (Prefer one command with line breaks if possible or no line breaks.)

That's the only command I want. I don't need to know the top info like current app using the most processor, or even the processor usage. Just RAM usage. Free, Wired, Active and Inactive.

I would only be calling it every 5-10 minutes or so just to keep processor usage down. (I only call my weather scripts every 900 seconds -- 15 minutes)
 
Callendar script

CPU usage is little, unless you set something to 0

The desktop calendar via geektool:
Code:
 cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"

Picture%201.png

Your callendar is amazing, can you please share the script for this one line callendar?
 
So, what exactly would be the shell command to retrieve the information displayed here:
308cmjr.jpg


Either as one command or four separate ones. (Prefer one command with line breaks if possible or no line breaks.)

That's the only command I want. I don't need to know the top info like current app using the most processor, or even the processor usage. Just RAM usage. Free, Wired, Active and Inactive.

I would only be calling it every 5-10 minutes or so just to keep processor usage down. (I only call my weather scripts every 900 seconds -- 15 minutes)
Nobody? I was really hoping. How about the top three or so apps ordered by how much Physical RAM they are using?


I'm past that... plus I want to be able to control the fronts, size, color, ect...

Could someone post the script for track name, artist name, and album name individually?

EDIt - nvm... figured it out :)
You can with BowTie if you know HTML, CSS andJavaScript.

219rmkh.jpg


Al Bowtie except the weather.

I tried to do the time and date in GeekTool, but I had a couple problems:

I couldn't get the timezone right. (Snow Leopard did something to the time retrieval. Web browsers and the Terminal now retrieve the time as GMT. I had to subtract 4 hours in WebKit JavaScript to get the time right in my Bowlet. But for some reason I couldn't get it working right in the Terminal. I keep getting time that's 4 hours ahead.)

GeekTool doesn't have a way to synchronize all of its individual pieces. If I have time, I want them all to update at the same time. I'd need my seconds to update every 1 second, and the minutes to update every 60, but you can't synchronize it. Even if you use 1 second for the hours and minutes you end up with out of sync updates.

Also, you can only do a calendar if you use a monospaced font or you end up with misaligned numbers. And since my calendar is so small, it has to be Helvetica Neue for smoothing so I can actually read it. Using something like VT100 would look like a blob of pixels at that font size. Also, GeekTool could never output a calendar like the one I have.

I'd switch to GeekTool 3.0 so I could use its built-in "choose pictures at random from a folder" option for my rotating "cute girls" photo frame down there, but GT3 doesn't like the script I use for weather right now. I don't know why. It retrieves correctly in the Terminal, but not in GeekTool. Anyone with GT3 use this code for their weather and have it work?
Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=18901|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i }'
Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=18901|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'
 
well... I'm not experienced in coding at all... and I'm pretty content with my results for a first time attempt :eek:

picture3btv.png

Looks really nice actually. I just hate that I can't synchronize GeekTool "geeklets" so they all update on a set schedule to prevent out of sync updating. Since I like having my seconds visible, I'd have to have all my Geeklets updating every second else they'd be way out of sync, but then they'd be taking a lot of resources.

So... Terminal command for retrieving RAM usage and the app using the most physical RAM. Anyone?
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.