a weird question. I want to be able to color specific days in different background in the Org-agenda buffer (created with org-agenda-list). I want it to be lets say every Monday and Wednesday. The aim is to get a nice visual queue to not schedule meeting during theses days so i can focus on actual work :). Ideally i would like the day header and all the time slots to get a different background on these specific days. any clue if that's possible?
The following is a custom function, set with the built-in variable
org-agenda-day-face-function, that controls the colors of the date header in the
*Org Agenda* buffer generated by calling
org-agenda-list. In the context of the function
calendar-day-of-week, Monday is
1 and Wednesday is
If another forum participant would like to tackle the entries that appear underneath this date header, please feel free to write up an alternative answer.
(defun my-org-agenda-get-day-face-fn (date) "Return the face DATE should be displayed with." (let ((day-of-week (calendar-day-of-week date))) (cond ((or (= day-of-week 1) (= day-of-week 3)) '(:background "red")) ((org-agenda-todayp date) 'org-agenda-date-today) ((member day-of-week org-agenda-weekend-days) 'org-agenda-date-weekend) (t 'org-agenda-date)))) (setq org-agenda-day-face-function 'my-org-agenda-get-day-face-fn)