Date: Sat, 10 Oct 2009 05:01:34 -0400 From: PJ <af.gourmet@videotron.ca> To: freebsd-questions@freebsd.org Subject: conky calendar Message-ID: <4AD04D6E.5000309@videotron.ca>
next in thread | raw e-mail | index | archive | help
I'm having a bit of a time with the calendar.sh script I found on the Net; it doesn't display quite correctly. It should have brackets around the current date, but I can't figure out what is not functioning correctly: #!/bin/sh cal | awk 'NR>2' | sed -e 's/ / /g' -e 's/[^ ] /& /g' -e 's/..*/ & /' -e 's/ \('`date | awk '{print $2}'`'\) /\['`date | awk '{print $2}'`'\]/' Change the NR>2 to NR1 and the printout includes the days of the week: Su Mo Tu We Th Fr Sa 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 Since today is the 10th, we should be seeing [10] - but we are not. Also, there is the problem of the 1,2,3 not showing in the right days - in conky this can be fixed by not using xft... but then I'm not sure of how to change the font size... perhaps the xorg screen size is the default ??? I'm not very good at programming, but I did look up the man pages for cal, sed and awk but it is a little complicated for my little brain. Can anyone help, please?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AD04D6E.5000309>