#!/bin/bash # # pop-up calendar for dzen # # (c) 2007, by Robert Manea # TODAY=$(expr `date +'%d'` + 0) MONTH=`date +'%m'` YEAR=`date +'%Y'` ( echo '^bg(#000000)^fg(#111111)' #date +'%A, %d.%m.%Y %H:%M' # current month, highlight header and today cal | sed -r -e "1,2 s/.*/^fg(white)&^fg()/" \ -e "s/(^| )($TODAY)($| )/\1^bg(white)^fg(#000)\2^fg()^bg()\3/" # next month, hilight header [ $MONTH -eq 12 ] && YEAR=`expr $YEAR + 1` cal `expr \( $MONTH + 1 \) % 12` $YEAR \ | sed -e "1,2 s/.*/^fg(white)&^fg()/" ) \ | dzen2 -p 60 -bg '#000000' -fn '-*-terminus-*-*-*-*-12-*-*-*-*-*-iso10646-*' -x 170 -y 15 -w 120 -l 15 -sa l -e 'onstart=uncollapse;button3=exit'