Hey guys, I'm trying to get a conky calendar on my desktop and I'm having some trouble. It seems that there is something going wrong when it tries to change the colour of the current date. Was hoping somebody could have a look and tell me where it's messing up?
Here's my .conkyrc3 file:
Code:
# Conky, a system monitor, based on torsmo
#
alignment bottom_left
#background transparent
background yes
#border_width 0
#cpu_avg_samples 2
#top_cpu_separate yes
default_color red
#default_outline_color white
#default_shade_color white
#draw_borders no
#draw_graph_borders no
#draw_outline no
#draw_shades no
use_xft yes
xftfont LCDMono:size=19
gap_x 15
gap_y 15
minimum_size 300 150
maximum_width 300
#net_avg_samples 2
double_buffer yes
#out_to_console no
#out_to_stderr no
#extra_newline no
own_window yes
own_window_class Conky
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#stippled_borders 0
update_interval 1.0
uppercase no
#use_spacer none
#show_graph_scale no
#show_graph_range no
TEXT
${font LCDMono:size=19}${color}${pre_exec ~/Conky/scripts/calendario.sh semana}
${color gray}${pre_exec ~/Conky/scripts/calendario.sh pasado}${color red}${pre_exec ~/Conky/scripts/calendario.sh hoy}${color gray}${pre_exec ~/Conky/scripts/calendario.sh futuro}${font}
and here's the calendario.sh file:
Code:
#! /bin/sh
# written by: jjgomera
#str=`echo '\033[01;32m29'`
# replace the 4 "cal |" with "cal -m |" to have the week start on Monday
DATE=`date | awk -F" " '{print $3}'`
case "$1" in
mes)
cal | head -n1
;;
semana)
cal | head -n2 | tail -n1
;;
pasado)
cal | grep -v '[a-zA-Z]' | grep '[0-9]' | awk -F$DATE ' BEGIN {i=0}
($1 == $0 && i==0) {print $1}($1 != $0 && i==0){i=i+1;print $1}';
;;
hoy)
echo $DATE;
;;
futuro)
cal | grep -v '[a-zA-Z]' | grep '[0-9]' | awk -F$DATE ' BEGIN {i=1}
(i==0) {print $0}($1 != $0 && i==1){i=i-1;print $2}';
;;
esac
Bookmarks