From owner-freebsd-questions@FreeBSD.ORG Sat Oct 10 09:01:32 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE2D91065670 for ; Sat, 10 Oct 2009 09:01:32 +0000 (UTC) (envelope-from af.gourmet@videotron.ca) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 89B728FC08 for ; Sat, 10 Oct 2009 09:01:32 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=UTF-8 Received: from [192.168.0.51] ([96.21.103.185]) by VL-MO-MR005.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0KRA00AZ9JQJCI60@VL-MO-MR005.ip.videotron.ca> for freebsd-questions@freebsd.org; Sat, 10 Oct 2009 05:01:31 -0400 (EDT) Message-id: <4AD04D6E.5000309@videotron.ca> Date: Sat, 10 Oct 2009 05:01:34 -0400 From: PJ User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) To: freebsd-questions@freebsd.org Subject: conky calendar X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2009 09:01:32 -0000 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?