Conkycalendar.sh (en)

From Conky PitStop

Revision as of 16:21, 3 April 2011 by Wlourf (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

conkycalendar.sh

 Language   English   Français   


Script-crinos512-conkycalender.png

A fairly simple calender script…. this is loosely based on the calenderio.sh, and insights gained from it.
This script also uses the howlong.pl script at the bottom to keep me informed of important dates.

#!/bin/bash
# conkycalender.sh
# by Crinos512
# Usage:
#  ${execp ~/.conky/conkyparts/conkycalender.sh}
#
DJS=`date +%_d`
Month=`date +'%B %Y' | tr '[:lower:]' '[:upper:]'`
Countdown=`~/.conky/howLong.pl "September 21, 2009 20:00:00"`

echo "\${color1}\${stippled_hr 1}\${color}"
echo "\${voffset -6}  $Month:\${font Liberation Mono:size=8}"
echo "\${voffset -6}\${color1}\${stippled_hr 1}\${color}"
for i in {1..7}
do
  Text=`cal | sed '1d' | sed '/./!d' | sed 's/$/                     /' | sed -n '/^.\{21\}/p' | head -n $i | tail -n 1 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed s/"Su Mo Tu We Th Fr Sa"/'\${color2}'"Su Mo Tu We Th Fr Sa"'\${color}'/ | sed /" $DJS "/s/" $DJS "/" "'${color2}'"$DJS"'${color}'" "/`
  echo "\${goto 130}$Text"
done
echo "\${alignc}~ Heroes returns in: \${color2}$Countdown\${color} ~\${font}"

exit 0

[UPDATED: 12 Sept. 2009]

Personal tools
Namespaces
Variants
Actions
Navigation
English
Français
Toolbox