Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Even more fun with cal and GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Even more fun with cal and GeekTool
Authored by: zisht on Oct 28, '05 05:44:12PM

Sorry, but I just got into GeekTool and ran across this post as old as it maybe. Here is my simple solution placed in a zsh script:


#! /bin/zsh
local A="`print | tr '\012' '\001'`"
local today=`date | awk '{print $3}'`
date "+  %a %b %d, %Y%n        %H:%M"
cal | tail -n -7 | sed "s$A $today$A($today)$A" | \
sed "s$A$today $A($today)$A" | \
sed "s$A $today $A($today)$A"

Maybe over simplified, but I've tried my best without including the localization.

Here is the output:


  Sat Oct 29, 2005
        09:36
 S  M Tu  W Th  F  S
                   1
 2  3  4  5  6  7  8
 9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28(29)
30 31


[ Reply to This | # ]