Guest User

Untitled

a guest
Sep 28th, 2011
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. #.conkyrc
  2.  
  3. background no
  4. out_to_console no
  5. use_xft yes
  6. xftalpha 0.8
  7. update_interval 3
  8.  
  9. own_window yes
  10. own_window_transparent yes
  11. own_window_hints undecorated,below,skip_taskbar
  12. own_window_type override
  13.  
  14. double_buffer yes
  15.  
  16. draw_shades no
  17. draw_borders no
  18.  
  19. gap_x 10
  20. gap_y 10
  21. alignment bottom_right
  22. use_spacer none
  23. uppercase yes
  24.  
  25. text_buffer_size 2048
  26.  
  27. TEXT
  28.  
  29. ${color #FFFFFF}${font Droid Sans Mono:size=18}${execpi 3600 python /path/to/calendar.py}
  30.  
  31. #calendar.py
  32.  
  33. import time, calendar, re
  34.  
  35. local= time.localtime(time.time())
  36. cal = calendar.month(local[0], local[1])
  37.  
  38. today = '(?<= )%s(?= )|(?<=\n)%s(?= )|(?<= )%s(?=\n)' % (local[2], local[2], local[2])
  39. title = '%s %s' % (calendar.month_name[local[1]], local[0])
  40. colorized = '${color #A5D4DF}%s${color #44929F}' % local[2]
  41.  
  42. noTitleCal = re.sub(title, '', cal)
  43. colorizedCalWithoutTitle = re.sub(today, colorized, noTitleCal)
  44.  
  45. print(colorizedCalWithoutTitle)
  46.  
Advertisement
Add Comment
Please, Sign In to add comment