Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colorizing org headings based on todo keyword #72

Closed
JonatanSahar opened this issue Apr 3, 2023 · 2 comments
Closed

colorizing org headings based on todo keyword #72

JonatanSahar opened this issue Apr 3, 2023 · 2 comments

Comments

@JonatanSahar
Copy link

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
Copy link
Owner

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
Copy link
Author

JonatanSahar commented Apr 12, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants