ratpoison-devel
[Top][All Lists]
Advanced

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

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


From: Rob Paisley
Subject: [RP] [PATCH] Added contrib/ratdate.sh and updated Makefile.am
Date: Mon, 18 Nov 2013 09:11:27 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

>From 7164921a21eea65eb543fb075ef454f34fda9420 Mon Sep 17 00:00:00 2001
From: Rob Paisley <address@hidden>
Date: Mon, 18 Nov 2013 09:07:55 -0500
Subject: [PATCH] Added contrib/ratdate.sh and updated Makefile.am

ratdate.sh displays the date with a calendar indicating today's
date. Designed to replace ratpoison's default :date command.
Suggest rebinding :time as follows: bind a exec exec ratdate.sh
---
 contrib/Makefile.am |    4 ++--
 contrib/ratdate.sh  |   12 ++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)
 create mode 100644 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 100644
index 0000000..95da64e
--- /dev/null
+++ b/contrib/ratdate.sh
@@ -0,0 +1,12 @@
+#!/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
+#
+# 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
+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"
-- 
1.7.9.5



reply via email to

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