ratpoison-devel
[Top][All Lists]
Advanced

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

[RP] ratdate.sh contribution


From: Rob Paisley
Subject: [RP] ratdate.sh contribution
Date: Tue, 12 Nov 2013 18:35:21 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

All:

I was unable to find a more automated way to propose this patch to ratpoison.
I've submitted patches in the past via patch, so that's how I'll propose this
one.

I've added a script called ratdate.sh to contrib/

I use it to replace :time and it produces the following style output:

 06:33:40 PM - Tuesday
   11/12/13 - November 
 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

Note the <> around today's date.

Thanks in advance.

Rob Paisley

Below is the patch of two files: contrib/Makefile.am and contrib/ratdate.sh

diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 5ae7445..dd51dd2 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 = ratpoison.el split.sh genrpbindings rpws allwindows.sh 
clickframe.pl rpshowall.sh unrat.c sloppy.c ratdate.sh
+EXTRA_DIST    = ratpoison.el split.sh genrpbindings rpws allwindows.sh 
clickframe.pl rpshowall.sh unrat.c sloppy.c ratdate.sh
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/contrib/ratdate.sh b/contrib/ratdate.sh
new file mode 100755
index 0000000..0578856
--- /dev/null
+++ b/contrib/ratdate.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Displays a date with calendar indicating today via ratpoison's echo command
+# Suggest rebinding :time as follows: :bind a exec exec ratdate.sh
+today=`date +%e`
+cal=`cal -h | tail -n +2 | sed -e 's/^Su/\n Su/' -e 's/.*/ & /' -e "s/\ 
$today\ /\<$today\>/"`
+exec ratpoison -c "echo `date +' %r - %A %n    %D - %B'` $cal"



reply via email to

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