I discovered a webpage where a Linux user posted his previous/current/next month calendar for conky. I have been able to set the colors and the font to my preference, the issue is the numerals are completely out of format and do not at all line up with the days to make clean vertical columns of text.
Can anyone tell me if:
1) The calendar can be formatted
2) Whats the easiest way to eliminate the previous & next calendars? I tried just removing the lines for displaying them in .conf but this made the current month calendar disappear as well.
Here's the files:
conky.conf
Code: Select all
-- needs package cal (provided by ncal) - sudo apt install ncal
conky.config = {
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'skip_taskbar,skip_pager,undecorated,below',
own_window_class = 'Conky',
own_window_argb_visual = true,
background = true,
update_interval = 60,
double_buffer = true,
alignment = 'top_middle',
gap_x = 500,-- left | right
gap_y = 0,-- up | down
minimum_width = 518, minimum_height = 174,
maximum_width = 518,
use_xft = true,
draw_outline = false,
draw_shades = true,
font = 'Neon 80s:size=9',
default_color = 'e82127',
};
conky.text = [[
${image calendar.png -p 0,0}\
${voffset 31}${execpi 60 ./previousmonth.sh}
${voffset -123}${execpi 60 ./currentmonth.sh}
${voffset -105}${execpi 60 ./nextmonth.sh}
# ${alignc}${voffset 3}${color white}${font Neon 80s:bold:size=10}${time %A %B %e, %Y}${font}${color}
]];
Code: Select all
#!/bin/bash
YEAR=`date +%_Y`;TDY=`date +%_d`;MTH=`date +%_B`; cal | sed s/"\([^a-zA-Z]\)$MTH"'\b'/'${color white}${font Neon 80s:bold:size=11} '" $MTH"'${color}'/ | sed s/"\([^0-9]\)$YEAR"'\b'/'${color white}'" $YEAR"'${color}${font}'/ | sed s/"\([^0-9]\)$TDY"'\b'/'${color white}'" $TDY"'${color}'/ | sed s/^/'${alignc}'/
Code: Select all
#!/bin/bash
YEAR=`date --date='next month' +%_Y`; MONTH=`date --date='next month' +%_m`; MTH=`date --date='next month' +%_B`; cal -m $MONTH $YEAR | sed s/"\([^a-zA-Z]\)$MTH"'\b'/'${color red}'" $MTH"'${color}'/ | sed s/"\([^0-9]\)$YEAR"'\b'/'${color red}'" $YEAR"'${color}'/ | sed s/^/'${alignr 30}'/
Code: Select all
#!/bin/bash
YEAR=`date --date='1 month ago' +%_Y`; MONTH=`date --date='1 month ago' +%_m`;MTH=`date --date='1 month ago' +%_B`; cal -m $MONTH $YEAR | sed s/"\([^a-zA-Z]\)$MTH"'\b'/'${color red}'" $MTH"'${color}'/ | sed s/"\([^0-9]\)$YEAR"'\b'/'${color red}'" $YEAR"'${color}'/ | sed s/^/'${offset 30}'/
Logan