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

Is there anyway I can get geektool to give me a mail alert or unread mail count (OSX Mail.app). I like to have my dock hidden so it would be good to make a small mail alert/counter and put on top of the menu bar at the top.
Any ideas hwo to write that (or non-geek tool alternative).

Thanks
 
Nice. where are you from?


Anyone have trouble installing Lynx?

Code:
/Applications/lynx.command; exit
Welcome to Darwin!
--------:~ --------- /Applications/lynx.command; exit
Bus error
logout
[Process completed]

Can anyone help?

Nevermind only works on leopard
 
Changed it. Again. Merged together time+am/pm and temperature and conditions.
 

Attachments

  • Picture 1.png
    Picture 1.png
    748.6 KB · Views: 2,146
Is it possible to have the output in capital letters? I know some fonts are naturally in the form of capital letters, but I'm thinking of (for example) having the month be in all capital letters in Helvetica. I don't see an option in the font picker, so it must be based on a command?
 
Is it possible to have the output in capital letters? I know some fonts are naturally in the form of capital letters, but I'm thinking of (for example) having the month be in all capital letters in Helvetica. I don't see an option in the font picker, so it must be based on a command?

You can do it with AWK, but it seems to be a bit complicated.

However, if you'd like, you can create a simple perl script that will do this for you;

ucd.pl
Code:
#!/usr/bin/perl
use Shell;
my $sh = Shell->new;
print uc $sh->date('+%B');

and then run it using:

Code:
perl /path/to/ucd.pl

Note: I only did this with the "Shell" object to demonstrate how it can be used to run any other shell command (even custom ones like Lynx).
 
geektool and chat?

I'm pretty recent into geektool and LOVE it. It cannot be said enough how beautiful basic text can look. I've got geektool with the date, day, time, temp, current month's calendar, uptime and cpu info, disk info, and reminders using the other great tool REMIND.

The one last thing I would love is to have my chat client piped into geektool and placed on my desktop as well. Right now I use Adium and have a theme that is very ignorable and blends well with my geektool output, but I would love to have it in the same place.

Enter hours spent trying to fiddle with finding, downloading, compiling, etc. a chat client that could possibly(?) be output by geektool. I came across centericq but have had trouble compiling it.

I'm about three paces past n00b and would love to know from you wiser folk whether this is just a pipe dream that makes no real sense. Would it be possible to use geektool to output a terminal-based chat client the way it outputs info from lynx?
 
Here are my GeekTool scripts, just set up. Unfortunately the calendar I had to do manually for now, which means I'll have to update it each month (the current date is being highlighted automatically, but I'll have to swap out the monthly calendar because the cal command doesn't let me do a single line calendar).

jW

i would love this calender script pretty pleeease
 
i would love this calender script pretty pleeease

A calendar can be achieved by calling the "cal" command.
Code:
cal

However, if you'd like for it to surround the current date, you can use this simple script that I just came up with:
cal.pl
Code:
#!/usr/bin/perl
use Shell;
my $sh    = Shell->new;
my $cal   = $sh->cal();

my $date = $sh->date('+%d');
$date =~ s/\n//;

if($sh->date('+%A') =~ m/Saturday/){
	if($date < 10){
		$cal =~ s/  $date/\[ $date\]/;
	}
	else {
		$cal =~ s/ $date/\[$date\]/;
	}
}
else {
	if($date < 10){
		$cal =~ s/  $date /\[ $date\]/;
	}
	else {
		$cal =~ s/ $date /\[$date\]/;
	}
}

print $cal;

Execute using:
Code:
perl cal.pl
 
Here's mine. Have to thank the first post in this thread. My GeekTool was boring until I came across it.
 

Attachments

  • Desktop.png
    Desktop.png
    1.1 MB · Views: 677
I like to have one that reads my unread mails from mail.app next :)

Two questions:
1) How have you got your temperature to display in celsius? Mine is only displaying in farenheight which is irritating me.
2) What font is that?

:)

AppleMatt
 
1) How have you got your temperature to display in celsius? Mine is only displaying in farenheight which is irritating me.

Haha, I'm having the opposite problem. I'd like mine to display in Farenheight, not Celsius. I think it just displays what the website puts out, right?
 
What web site or code are you guys using?

Here's my weather result:
img.jpg

From condition code:
Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=bournemouth|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'

From temp. code:
Code:
lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=bournemouth|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'
 
What web site or code are you guys using?

Here's my result weather result:

I'm using the exact same code as you. In-fact, I made a second one and copied and pasted yours and it still returned as farenheight.

AppleMatt
 
I'm using the exact same code as you. In-fact, I made a second one and copied and pasted yours and it still returned as farenheight.

AppleMatt

Oh! I have no idea then. You copied my line of code exactly, but it returns F???

Go on...show me some hard evidence ;-)
 
Ok, I am having e-mail now with the folowing code:

Code:
echo 'tell application "Mail" to return unread count of inbox as string & " new e-mail"' | osascript | grep -v '0 new e-mail'

This returns nothing when there is no mail and x new e-email when there is mail, however it starts mail.app when it is not running, something I don't want it to do.

I had about the same with itunes but it now checks if itunes is running, if its not it won't execute the script. I am not a programmer, but I feel the same is possible for this script. Anyone?

iTunes script:
Code:
property go1 : false
-- check to see if iTunes is running
tell application "System Events"
	set the process_flag to (exists process "iTunes")
end tell
if the process_flag then
	-- check to see if iTunes is playing
	tell application "iTunes"
		if player state contains playing then set go1 to true
	end tell
	if go1 then
		-- do what you need to do
		tell application "iTunes"
			set foo1 to name of current track
			set foo2 to artist of current track
			set foo3 to album of current track
			set foo4 to foo1 & " / " & foo2 & " / " & foo3
		end tell
	end if
end if

I am sure these 2 can sortoff be combined to achieve that same. Even better would be if it would read 1 new email and 2 new emails and so forth.

Thanks
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.