Custom Search

Tuesday, November 10, 2009

Small Conky Calendar

I”m not a perl programmer and I’m sure my chances of having
come up with this on my own would be right up there with the
classic example about the monkeys with typewriters creating
the encyclopedia! :-) I got it off this mailing list:

cal | perl -pe ’s/^/ /;s/$/ /;s/ ‘”$(date “+%e”)”‘ /\['"$(date "+%e")"']/’

I plugged it into the bottom of my .conkyrc file like so:

${color green}${execi 360 cal | perl -pe ’s/^/ /;s/$/ /;s/ ‘”$(date “+%e”)”‘ /\[ '"$(date "+%e")"']/’} ${color}

BTW, the above perl lines are wrapped, both the first which
is from the command line, and the second, which is the entire
line in .conkyrc. It shows the current day enclosed in brackets
in order to highlight it. Nice touch.


Labels: , , , , ,


Post a Comment

Links to this post:

Create a Link

<< Home