summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRob Paisley <paisley@rpaisley.com>2013-11-16 19:38:28 -0500
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-11-17 17:36:51 +0100
commit2e7e99fc780c4099861039ebaab0fb8629d7601b (patch)
treec745ea493bd08572895f83c54dfb3e48a8206503 /contrib
parentdf842f317f02414f28b8c81394446fb273301eec (diff)
downloadratpoison-2e7e99fc780c4099861039ebaab0fb8629d7601b.zip
Added contrib/ratdate.sh and Makefile for building
ratdate.sh displays the date with a calendar inditacting today's date. Designed to replace ratpoison's default :time command. Suggest rebinding as follows: bind a exec exec ratdate.sh
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Makefile.am4
-rwxr-xr-xcontrib/ratdate.sh9
2 files changed, 11 insertions, 2 deletions
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..c4222cd
--- /dev/null
+++ b/contrib/ratdate.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# License: CC BY-ND 3.0 see http://creativecommons.org/licenses/by-nd/3.0
+#
+# 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"