protesilaos / modus-themes

Highly accessible themes for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA).
https://protesilaos.com/emacs/modus-themes
GNU General Public License v3.0
526 stars 29 forks source link

colorizing org headings based on todo keyword #72

Closed JonatanSahar closed 1 year ago

JonatanSahar commented 1 year ago

Hi, org-mode's documentation suggests setting the faces for different keywords like so:

(setq org-todo-keyword-faces
      '(("TODO" . org-warning) ("STARTED" . "yellow")
        ("CANCELED" . (:foreground "blue" :weight bold))))

I was wondering if the theme has some setting which controls this as well, or should I set it manually and use the theme's color pallete?

Thanks!

protesilaos commented 1 year ago

Hello @JonatanSahar!

No, the themes don't have such a setting. Here is how I do it on my end:

  (defface prot/org-bold-todo
    '((t :inherit (bold org-todo)))
    "Face for bold TODO-type Org keywords.")

  (defface prot/org-bold-done
    '((t :inherit (bold org-done)))
    "Face for bold DONE-type Org keywords.")

  (defface prot/org-bold-shadow
    '((t :inherit (bold shadow)))
    "Face for bold and `shadow' Org keywords.")

  (setq org-todo-keyword-faces
        '(("WAIT" . prot/org-bold-todo)
          ("MAYBE" . prot/org-bold-shadow)
          ("CANCEL" . prot/org-bold-done)))

By inheriting other faces, I am guaranteed to get support by every theme.

JonatanSahar commented 1 year ago

Thanks!

On Wed, 12 Apr 2023 at 06:21, Protesilaos Stavrou @.***> wrote:

Closed #72 https://github.com/protesilaos/modus-themes/issues/72 as completed.

— Reply to this email directly, view it on GitHub https://github.com/protesilaos/modus-themes/issues/72#event-8980375682, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEL3S3C3LR7JLU2YBG5UIHDXAYNSXANCNFSM6AAAAAAWQ4LJLI . You are receiving this because you were mentioned.Message ID: @.***>