branch: externals/nano-agenda commit 7bbe87b054f157ee490792b2b3fd2d1bba778d14 Author: Nicolas P. Rougier <nicolas.roug...@inria.fr> Commit: Nicolas P. Rougier <nicolas.roug...@inria.fr>
Added colored busy days --- nano-agenda.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nano-agenda.el b/nano-agenda.el index a725535..abadb70 100644 --- a/nano-agenda.el +++ b/nano-agenda.el @@ -68,13 +68,13 @@ (defvar nano-agenda-today-symbol "•" "Symbol to show curren day") -(defvar nano-agenda-busy-backgrounds (list "#FFF9DB" "#FFF3BF" "#FFEC99" "#FFE066" "#FFD43B" - "#FCC419" "#FAB005" "#F59F00" "#F08C00" "#E67700") +(defcustom nano-agenda-busy-backgrounds (list "#FFF9DB" "#FFF3BF" "#FFEC99" "#FFE066" "#FFD43B" + "#FCC419" "#FAB005" "#F59F00" "#F08C00" "#E67700") "Background colors to be used to highlight a day in calendar view according to busy level.") -(defvar nano-agenda-busy-foregrounds (list "#000000" "#000000" "#000000" "#000000" "#000000" - "#000000" "#000000" "#000000" "#000000" "#FFFFFF") +(defcustom nano-agenda-busy-foregrounds (list "#000000" "#000000" "#000000" "#000000" "#000000" + "#000000" "#000000" "#000000" "#000000" "#FFFFFF") "Foreground colors to be used to highlight a day in calendar view according to busy level.") @@ -204,6 +204,10 @@ (rformat (format "%%%ds" (- size)))) (format rformat (format lformat string)))) +(defun nano-agenda-select-window () + "Default function to select where to show agenda." + + (split-window nil -10 nil)) (defun nano-agenda () "Create windows & buffers associated with the agenda (below current window). @@ -229,8 +233,7 @@ (when agenda-window (delete-window agenda-window) (setq agenda-window nil)) - (setq calendar-window (split-window nil -10 nil))) - ;; (setq calendar-window (split-window nil -10 'above))) + (setq calendar-window (nano-agenda-select-window))) ;; Create agenda window if necessary (unless agenda-window