Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Oct 2009 06:11:52 -0400
From:      jhell <jhell@DataIX.net>
To:        PJ <af.gourmet@videotron.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: conky calendar
Message-ID:  <alpine.BSF.2.00.0910100609310.75184@qvzrafvba.5c.ybpny>
In-Reply-To: <4AD04D6E.5000309@videotron.ca>
References:  <4AD04D6E.5000309@videotron.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sat, 10 Oct 2009 05:01, af.gourmet@ wrote:
> 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?
>

Where did you Saturday go to ? I would love for some of my Thursdays and 
sometimes Fridays to just disappear like this but Saturday ? come on now 
what is the world coming to ? ;)

-- 

  ;; dataix.net!jhell         2048R/89D8547E 2009-09-30
  ;; BSD since FreeBSD 4.2    Linux since Slackware 2.1
  ;; 85EF E26B 07BB 3777 76BE  B12A 9057 8789 89D8 547E




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