ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] [PATCH] Added contrib/ratdate.sh and updated Makefile.am


From: Jérémie Courrèges-Anglas
Subject: Re: [RP] [PATCH] Added contrib/ratdate.sh and updated Makefile.am
Date: Thu, 05 Dec 2013 00:34:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix)

Rob Paisley <address@hidden> writes:

> Below is a more correct version of the ratdate.sh patch, including copyright,
> license, and removal of non-portable calls to cal and tail.

Thanks, this has been pushed to the savannah repo.

> Note that the :alnum: ctype(3) is used to remove highlighting of today's date
> with versions of cal which do that.

Do you know of any cal(1) implementation that outputs ansi escape chars
when stdout isn't a terminal?

> Rob Paisley
>
>
> From b8522693bf016df6515476c778cef6bee3a5969f Mon Sep 17 00:00:00 2001
> From: Rob Paisley <address@hidden>
> Date: Wed, 4 Dec 2013 09:45:52 -0500
> Subject: [PATCH] Added contrib/ratdate.sh and updated Makefile.am
>
> ---
>  contrib/Makefile.am |    4 ++--
>  contrib/ratdate.sh  |   14 ++++++++++++++
>  2 files changed, 16 insertions(+), 2 deletions(-)
>  create mode 100755 contrib/ratdate.sh
>
> diff --git a/contrib/Makefile.am b/contrib/Makefile.am
> index 5ae7445..7695af4 100644
> --- a/contrib/Makefile.am
> +++ b/contrib/Makefile.am
> @@ -19,6 +19,6 @@
>  
>  bin_SCRIPTS = rpws
>  
> -pkgdata_DATA = ratpoison.el split.sh genrpbindings rpws allwindows.sh 
> clickframe.pl rpshowall.sh unrat.c sloppy.c
> -EXTRA_DIST    = ratpoison.el split.sh genrpbindings rpws allwindows.sh 
> clickframe.pl rpshowall.sh unrat.c sloppy.c
> +pkgdata_DATA = allwindows.sh clickframe.pl genrpbindings ratdate.sh 
> ratpoison.el rpshowall.sh rpws sloppy.c split.sh unrat.c
> +EXTRA_DIST   = allwindows.sh clickframe.pl genrpbindings ratdate.sh 
> ratpoison.el rpshowall.sh rpws sloppy.c split.sh unrat.c
>  MAINTAINERCLEANFILES = Makefile.in
> diff --git a/contrib/ratdate.sh b/contrib/ratdate.sh
> new file mode 100755
> index 0000000..ab23513
> --- /dev/null
> +++ b/contrib/ratdate.sh
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +#
> +# Copyright (C) 2013 Rob Paisley
> +#
> +# Copying and distribution of this file, with or without modification,
> +# are permitted in any medium without royalty provided the copyright
> +# notice and this notice are preserved.
> +# 
> +# Description:       This script displays the date with a calendar 
> indicating today
> +#            via ratpoison's echo command.
> +# Suggest rebinding :time as follows: bind a exec exec ratdate.sh
> +t=`date +%e`
> +cal=`cal | sed -e '1s/.*//' -e 's/[^ [:alnum:]]//g' -e "s/\ $t\ /\<$t\>/"`
> +exec ratpoison -c "echo `date +'%r - %A%n   %D - %B'` $cal"

-- 
jca | PGP: 0x06A11494 / 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494



reply via email to

[Prev in Thread] Current Thread [Next in Thread]