diff options
author | Max Mikhanosha <max@openchat.com> | 2013-05-06 09:26:10 -0400 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-05-07 12:30:15 +0200 |
commit | 0f5cbc10199e4662bd076ee960615e3175b7bbea (patch) | |
tree | efb69d427ffb47163360d503fcd185da288ca5e7 | |
parent | 6871bdc8e7b773edac44f65b07f40ae3c0a4e2cc (diff) | |
download | org-mode-0f5cbc10199e4662bd076ee960615e3175b7bbea.tar.gz |
Add option to always show DONE days as green on consistency graph. It can be enabled by setting `org-habit-show-done-alwyays-green' variable to t.
* lisp/org-habit.el (org-habit-get-faces): Add show done days green option.
-rw-r--r-- | lisp/org-habit.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el index 8465ba4..eba9037 100644 --- a/lisp/org-habit.el +++ b/lisp/org-habit.el @@ -85,6 +85,12 @@ today's agenda, even if they are not scheduled." :version "24.1" :type 'character) +(defcustom org-habit-show-done-always-green nil + "Non-nil means DONE days will always be green in the consistency graph. +It will be green even if it was done after the deadline." + :group 'org-habit + :type 'boolean) + (defface org-habit-clear-face '((((background light)) (:background "#8270f9")) (((background dark)) (:background "blue"))) @@ -272,8 +278,9 @@ Habits are assigned colors on the following basis: (if donep '(org-habit-ready-face . org-habit-ready-future-face) '(org-habit-alert-face . org-habit-alert-future-face))) - (t - '(org-habit-overdue-face . org-habit-overdue-future-face))))) + ((and org-habit-show-done-always-green donep) + '(org-habit-ready-face . org-habit-ready-future-face)) + (t '(org-habit-overdue-face . org-habit-overdue-future-face))))) (defun org-habit-build-graph (habit starting current ending) "Build a graph for the given HABIT, from STARTING to ENDING. |