back_log_backups.conkyrc 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ## Window settings
  2. own_window yes
  3. own_window_type override
  4. own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
  5. double_buffer yes
  6. ## Compton doesn't like conky transparent, so this is the fix
  7. ## http://conky.pitstop.free.fr/wiki/index.php5?title=Transparency_in_conky_(en)
  8. own_window_transparent no #yes
  9. own_window_argb_visual yes
  10. own_window_argb_value 0
  11. ## Window Size
  12. minimum_width 1900
  13. maximum_width 1920
  14. # fiddle with window
  15. use_spacer none
  16. use_xft yes
  17. ## Update interval in seconds
  18. update_interval 60.0
  19. ## Minimum size of text area
  20. # minimum_size 250 5
  21. ## Draw shades?
  22. draw_shades no
  23. ## Text stuff
  24. draw_outline no # amplifies text if yes
  25. draw_borders no
  26. font PragmataPro:size=7
  27. uppercase no
  28. ## Default colors and also border colors, grey90 == #e5e5e5
  29. default_color grey
  30. ## Text alignment, other possible values are commented
  31. #alignment top_left
  32. alignment top_right
  33. #alignment bottom_left
  34. #alignment bottom_right
  35. ## Gap between borders of screen and text
  36. ## The default size is a bit large
  37. gap_x 10
  38. gap_y 10
  39. ## stuff after ‘TEXT’ will be formatted on screen
  40. ## This summarizes the backup pass/fail state.
  41. ## Written to display 'fail' if periodicity not in log, though will look odd.
  42. ## For some reason 'monthly' can't be regexed... though it worked before fixing fail state.
  43. ## As such, 'month' is intentional.
  44. TEXT
  45. $color
  46. ${color grey90}Backups ${hr 2}$color
  47. Yearly ${alignr}${exec awk '/yearly/ {LL=$0;if($4=="passed"){LAST=$1 " " $2}} END {match(LL, /(.*)\s(.*)\t(\w+)\t(\w+)\t([0-9]+)/, m); if(m[4]=="passed"){printf "☑ passed %s %s\n", m[1], m[2]} else {printf "⚠ last passed %s\n", LAST}}' $HOME/.config/cryptshotr-cron/log}
  48. Monthly ${alignr}${exec awk '/month/ {LL=$0;if($4=="passed"){LAST=$1 " " $2}} END {match(LL, /(.*)\s(.*)\t(\w+)\t(\w+)\t([0-9]+)/, m); if(m[4]=="passed"){printf "☑ passed %s %s\n", m[1], m[2]} else {printf "⚠ last passed %s\n", LAST}}' $HOME/.config/cryptshotr-cron/log}
  49. Weekly ${alignr}${exec awk '/weekly/ {LL=$0;if($4=="passed"){LAST=$1 " " $2}} END {match(LL, /(.*)\s(.*)\t(\w+)\t(\w+)\t([0-9]+)/, m); if(m[4]=="passed"){printf "☑ passed %s %s\n", m[1], m[2]} else {printf "⚠ last passed %s\n", LAST}}' $HOME/.config/cryptshotr-cron/log}
  50. Daily ${alignr}${exec awk '/daily/ {LL=$0;if($4=="passed"){LAST=$1 " " $2}} END {match(LL, /(.*)\s(.*)\t(\w+)\t(\w+)\t([0-9]+)/, m); if(m[4]=="passed"){printf "☑ passed %s %s\n", m[1], m[2]} else {printf "⚠ last passed %s\n", LAST}}' $HOME/.config/cryptshotr-cron/log}
  51. Hourly ${alignr}${exec awk '/hourly/ {LL=$0;if($4=="passed"){LAST=$1 " " $2}} END {match(LL, /(.*)\s(.*)\t(\w+)\t(\w+)\t([0-9]+)/, m); if(m[4]=="passed"){printf "☑ passed %s %s\n", m[1], m[2]} else {printf "⚠ last passed %s\n", LAST}}' $HOME/.config/cryptshotr-cron/log}