GeekTool is an awesome OSX app. Its free, has a small footprint and runs out of the way, on your menu bar (not the dock).
Here is how I currently use GeekTool, I tweak this from time to time, but this works for me (on my dual screen setup).
First off install GeekTool from http://projects.tynsoe.org/en/geektool/
I’m not going to walk you through this step by step, if you get really stuck, drop me a message on twitter (@hamlesh).
There are two scripts I run to generate the two different “days alive” displays.
The large number alone on the left, is the following AppleScript;
((date ((current date) as string)) – (date (“DD/MM/YYYY” as string))) div days
Replace DD/MM/YYYY with your birthday in date/month/year format – eg: 16/04/1980
The “wordy” version in the bottom right is a simple variation of the above;
“Uptime ” & ((date ((current date) as string)) – (date (“DD/MM/YYYY” as string))) div days & ” days”
You need to copy and paste those into their own AppleScript files, and save them somewhere on your machine. In GeekTool the script you need to execute is;
osascript ~/Documents/GeekTools/DaysAliveNumber.scpt
You will need to update the path for wherever you have saved your scripts.
The Minutes:Seconds left in the day timer is the following AppleScript (I know, I know, its not very elegant, but it works – its actually a hacked variation of a generic “countdown” AppleScript code I found on the internet);
set todaydate to current date
set todayday to day of todaydate
set todaytime to time of todaydate
set todayyear to year of todaydate
set launchdate to current date
set launchday to day of launchdate
set launchtime to time of launchdate
set launchyear to year of launchdate
set yearsleft to launchyear – todayyear
set daysleft to launchday – todayday
set timeleft to 86400 – todaytime
set totaltimeleft to timeleft + {86400 * daysleft}
set totaltotaltimeleft to totaltimeleft + {yearsleft * 31536000}
set unroundedminutesleft to totaltotaltimeleft / 60
set totalminutesleft to {round unroundedminutesleft}
set unroundedhoursleft to totalminutesleft / 60
set totalhoursleft to {round unroundedhoursleft}
set unroundeddaysleft to totalhoursleft / 24
set totaldaysleft to {round unroundeddaysleft}
set unroundedyearsleft to totaldaysleft / 365
set totalyearsleft to {round unroundedyearsleft}
(“” & totalminutesleft & “:” & totaltotaltimeleft) as string
The date and time are simple variations of the following UNIX commands, called directly from GeekTool script. You don’t need to put these ones in AppleScript;
date ‘+%v’
date ‘+%H.%M’
Hope you find that useful, please post a comment if you have any questions, improvements, feedback. Or fire me a message @hamlesh.
Have something to say?