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

Click here to return to the 'Highlight the current date on a GeekTool 'cal' geeklet' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Highlight the current date on a GeekTool 'cal' geeklet
Authored by: jonjlee on Dec 01, '09 02:27:42PM
This (rather ugly) awk-based command should do the trick:

cal -y | awk -v month="`date +%m`" -v day="`date +%e` " '{m=int((NR-3)/8)*3+1; for (i=0;i<3;i++) {t[i]=substr($0,1+i*22,20) " "; if (m+i==month) sub(day,"\033[0;31m&\033[0m",t[i]);} print t[0],t[1],t[2];}'
Change the highlight color using the values billr posted above.
Edited on Dec 01, '09 02:32:28PM by jonjlee

[ Reply to This | # ]