Just edited the conky a little and got a nice centered calendar! So for the people who follow this topic or come across this topic and want to have a single month calendar, here's the scripts.
conky config
Code: Select all
-- needs package cal (provided by ncal) - sudo apt install ncal
conky.config = {
own_window = true,
own_window_type = 'desktop',
own_window_transparent = true,
own_window_colour = '000000',
own_window_argb_visual = true,
own_window_hints = 'skip_taskbar,skip_pager,undecorated,below',
own_window_class = 'Conky',
own_window_argb_visual = true,
background = false,
update_interval = 5,
double_buffer = true,
alignment = 'top_left',
gap_x = 10,
gap_y = 10,
minimum_width = 200,
minimum_height = 100,
maximum_width = 200,
use_xft = true,
draw_outline = false,
draw_shades = true,
font = 'Monaco:size=9',
default_color = 'e82127',
};
conky.text = [[
${voffset 11}${execp ./currentmonth.sh}
]];
Bash script
currentmonth.sh
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}'/