Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #.conkyrc
- background no
- out_to_console no
- use_xft yes
- xftalpha 0.8
- update_interval 3
- own_window yes
- own_window_transparent yes
- own_window_hints undecorated,below,skip_taskbar
- own_window_type override
- double_buffer yes
- draw_shades no
- draw_borders no
- gap_x 10
- gap_y 10
- alignment bottom_right
- use_spacer none
- uppercase yes
- text_buffer_size 2048
- TEXT
- ${color #FFFFFF}${font Droid Sans Mono:size=18}${execpi 3600 python /path/to/calendar.py}
- #calendar.py
- import time, calendar, re
- local= time.localtime(time.time())
- cal = calendar.month(local[0], local[1])
- today = '(?<= )%s(?= )|(?<=\n)%s(?= )|(?<= )%s(?=\n)' % (local[2], local[2], local[2])
- title = '%s %s' % (calendar.month_name[local[1]], local[0])
- colorized = '${color #A5D4DF}%s${color #44929F}' % local[2]
- noTitleCal = re.sub(title, '', cal)
- colorizedCalWithoutTitle = re.sub(today, colorized, noTitleCal)
- print(colorizedCalWithoutTitle)
Advertisement
Add Comment
Please, Sign In to add comment