You are not logged in.

#1 2010-06-27 20:25:50

Meister
Member
From: USA
Registered: 2010-05-11
Posts: 47

A conky cal issue

I need some eyes that know this code better then I do. My issue is that it seems my calendar only goes to the 26th, and I have no idea why. Could someone take a look at my conky and tell what needs to be altered to fix that?

alignment bottom_right
color0 FAFAFA
color1 ffffff
color2 888888
color3 AFD700
default_color 000000
double_buffer yes
draw_shades no
gap_x 30
gap_y 30
minimum_size 180 180
maximum_width 180
no_buffers yes
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
update_interval 3600
uppercase no
text_buffer_size 4096
use_xft yes
xftfont MaiandraGD:size=10

TEXT

${color2}${font LCDMono:bold:size=10} ${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color1}'"$DJS"'${color2}'" "/}

Offline

#2 2010-06-27 20:31:29

Banton
Member
Registered: 2010-05-28
Posts: 67

Re: A conky cal issue

This is my line, it works. Looks pretty much the same than yours.

${execpi 600 DJS=`date +%_d`; cal -m | sed '1d' | sed '/./!d' | sed 's/$/                     /' | fold -w 21 | 
sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color red}'"$DJS"'${color ffffff}'" "/}

Offline

#3 2010-06-27 20:40:28

Meister
Member
From: USA
Registered: 2010-05-11
Posts: 47

Re: A conky cal issue

Thanks for the code, I'm trying it out now, and it has added more days to make it to 30, but the numbers seem a little off balance to the days of week, and it does says today the 27th under Sunday, but it completely skips Monday, and says the 28th is Tuesday.

Offline

#4 2010-06-27 20:46:25

Banton
Member
Registered: 2010-05-28
Posts: 67

Re: A conky cal issue

This is strange, here it works perfect. tried another font?
Mine with Liberation Mono:

tNHJvZA

Last edited by Banton (2010-06-27 20:47:24)

Offline

#5 2010-06-27 20:59:48

Meister
Member
From: USA
Registered: 2010-05-11
Posts: 47

Re: A conky cal issue

Hmm, could I see your conkyrc for the calendar? Or is that little code the only part pertaining to the calendar.

Offline

#6 2010-06-27 21:06:38

Banton
Member
Registered: 2010-05-28
Posts: 67

Re: A conky cal issue

Sure, here you go:

background yes
cpu_avg_samples 2
net_avg_samples 2
out_to_console no
use_xft yes
xftfont Terminus:size=8
xftalpha 0.8
update_interval 1
own_window yes
own_window_type override 
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes 
maximum_width 180 
draw_shades no
draw_outline no
draw_borders no
default_color white
default_shade_color white
default_outline_color white
alignment top_right 
use_spacer no
#
##OUTPUT
#
#
TEXT
${font Liberation Sans:size=30}${alignc}${time %H:%M}${font}
${voffset 10}${font Liberation Sans:bold:size=9}${alignc}${time %A - %d - %B - %Y}${font}
${hr 2}
${font Liberation Mono:size=10}${color ffffff}${execpi 600 DJS=`date +%_d`; cal -m | sed '1d' | sed '/./!d' | sed 's/$/                     /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color red}'"$DJS"'${color ffffff}'" "/}${font}
#$nodename - $sysname $kernel 
${hr 2}

Offline

#7 2010-06-27 21:33:17

Meister
Member
From: USA
Registered: 2010-05-11
Posts: 47

Re: A conky cal issue

Very odd, your conky doesn't even output a calendar. Just the time, with two horizontal lines. I've even tried to find another conky or two, and everyone I seem to try, screws up the dates. This new one looks good besides the fact that it's the 5th on Thursday, Friday and Saturday are blank, and it's the 6th on Sunday. I don't get this at all.

Offline

#8 2010-06-27 21:37:02

Banton
Member
Registered: 2010-05-28
Posts: 67

Re: A conky cal issue

hmm set locale correctly? what does cal output in a terminal?

Offline

#9 2010-06-27 21:45:27

Meister
Member
From: USA
Registered: 2010-05-11
Posts: 47

Re: A conky cal issue

Not quite sure what you mean if I set locale correctly, or how I would check that. Output of cal in the terminal looks perfect.

Offline

#10 2010-06-27 21:54:09

Banton
Member
Registered: 2010-05-28
Posts: 67

Re: A conky cal issue

Found an easier Calendarline, looks a little bit easier for me, using it from know on:

${execpi 60 DJS=`date +%_d`; cal | sed s/"$DJS"'\b'/'${color red}'"$DJS"'$color'/}

Offline

#11 2010-06-27 23:02:31

Meister
Member
From: USA
Registered: 2010-05-11
Posts: 47

Re: A conky cal issue

Yea, I also found a really simple one, and it works like a charm. Guess going bigger and more complex isn't always better.

Offline

Board footer

Powered by FluxBB