Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Oct 2009 22:49:26 -0400 (EDT)
From:      vogelke+unix@pobox.com (Karl Vogel)
To:        freebsd-questions@freebsd.org
Subject:   Re: conky calendar
Message-ID:  <20091011024926.778E7BE63@kev.msw.wpafb.af.mil>
In-Reply-To: <319011.88077.qm@web51006.mail.re2.yahoo.com> (message from Richard Mahlerwein on Sat, 10 Oct 2009 07:41:19 -0700 (PDT))

next in thread | previous in thread | raw e-mail | index | archive | help
You can use the terminal standout codes to highlight today's date, but you
need either the Linux compatibility stuff or a recent version of ncurses
installed:

  #!/bin/ksh
  PATH=/usr/compat/linux/usr/bin:/usr/local/bin:/bin:/usr/bin
  export PATH

  DAY=$(date +%d | sed 's/0\([123456789]\)/ \1/')
  SMSO=$(tput smso)
  RMSO=$(tput rmso)
  cal | sed -e 's/^/ /' -e "3,\$s/ ${DAY}/ ${SMSO}${DAY}${RMSO}/"
  exit 0

-- 
Karl Vogel                      I don't speak for the USAF or my company

Letterman's top signs your cat is trying to kill you #9:
 To tune of Meow Mix song sings, "Kill kill kill kill, kill kill kill kill"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091011024926.778E7BE63>