Re: Simplicity
Since people are sharing some of their shortcuts, I'll make a
contribution too.
This is the current shell function I'm using to display a monthly
calendar. Normally, the shell and the terminal don't always agree on
the size of the window, especially if it's been recently resized. So, I
wanted something that would dynamically draw a calendar to fill the
screen, regardless of the current screen size.
This works best using windows that are approximately square.
Rectangular windows with one dimension much longer than the other will
render less readable results, which is naturally expected.
LPW is lines per week and subtracting 5 could be adjusted slightly to
taste. My $DOTREMINDERS file is located outside the home directory and
thus set for use with rem and other referencing.
function rcal ()
{
MONTHS=$1;
clear;
eval `resize`;
COLS=`resize|head -1|sed -e 's/^C.*=//' -e 's/;//'`;
LINS=`resize|grep ^L|sed -e 's/^L.*=//' -e 's/;//'`;
LPW=` expr \( $LINS / 5 \) - 5 `;
remind -c$MONTHS -w$COLS,$LPW,1 $DOTREMINDERS | tr -d "\f"
}
-Dave
(Continue reading)