diff options
-rw-r--r-- | init.org | 89 |
1 files changed, 54 insertions, 35 deletions
@@ -215,52 +215,70 @@ This is my org mode configuration. Document it. ("n" todo "NEXT" nil) ("d" "Agenda + Next Actions" ((agenda) (todo "NEXT"))))) -(defun my/modify-org-done-face () - (setq org-fontify-done-headline t) - (set-face-attribute 'org-done nil :strike-through t) - (set-face-attribute 'org-headline-done nil - :strike-through t - :foreground "light gray")) +(setq org-fontify-done-headline t) (require 'org-bullets) -(add-hook 'org-add-hook 'my/modify-org-done-face) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1) - - ;; render with variable pitch font (with a few exceptions) - (variable-pitch-mode 1) - (set-face-attribute 'org-document-title nil - :height 1.6 - :foreground "black") - (set-face-attribute 'org-level-1 nil - :height 1.3 - :foreground "black") - (set-face-attribute 'org-block-background nil :background "#efe9d6") - (dolist (face '(org-meta-line - org-document-info-keyword - org-special-keyword)) - (set-face-attribute face nil :foreground "#93a1a1" - :weight 'normal)) - (dolist (face '(org-block-begin-line - org-block-end-line - org-table - org-meta-line - org-document-info-keyword - org-special-keyword - org-verbatim - org-todo - org-block-background)) - (set-face-attribute face nil :inherit 'fixed-pitch) - ;; TODO: this is ugly. When scaling up the variable-pitch face the - ;; fixed-pitch face will become even larger. - (set-face-attribute face nil :height .8)))) + (variable-pitch-mode 1))) (defun gtd () (interactive) (find-file (concat org-directory "/master.org"))) #+END_SRC +I don’t like the way org-mode looks by default. It’s noisy, too +colourful and seems old-fashioned to the point of being somewhat +unattractive. This is why I find it important to change some of the +default faces. + +Since I enable =variable-pitch-mode= in my org-mode buffers I also +need to explicitly make a few faces inherit from the =fixed-width= +face to be rendered with a monospaced font. + +#+BEGIN_SRC elisp :noweb-ref org-mode-faces +(set-face-attribute 'org-done nil :strike-through t) +(set-face-attribute 'org-headline-done nil + :strike-through t + :foreground "light gray") +(set-face-attribute 'org-document-title nil + :height 1.6 + :foreground "black") +(set-face-attribute 'org-level-1 nil + :height 1.2 + :foreground "black") +(set-face-attribute 'org-level-2 nil + :height 1.1 + :foreground "black") +(set-face-attribute 'org-level-3 nil + :height 1.05 + :foreground "black") +(set-face-attribute 'org-level-4 nil + :height 0.9 + :foreground "black") +(set-face-attribute 'org-block-background nil :background "#efe9d6") +(set-face-attribute 'org-verbatim nil :background "#efe9d6") +(dolist (face '(org-meta-line + org-document-info-keyword + org-special-keyword)) +(set-face-attribute face nil :foreground "#93a1a1" + :weight 'normal)) +(dolist (face '(org-block-begin-line + org-block-end-line + org-table + org-meta-line + org-document-info-keyword + org-special-keyword + org-verbatim + org-todo + org-block-background)) + (set-face-attribute face nil :inherit 'fixed-pitch) + ;; TODO: this is ugly. When scaling up the variable-pitch face the + ;; fixed-pitch face will become even larger. + (set-face-attribute face nil :height .8)) +#+END_SRC + The following snippet is an attempt to prettify the somewhat ugly headers of source code blocks in =org-mode=. The snippet was taken from [[https://pank.eu/blog/pretty-babel-src-blocks.html][the blog of Rasmus Pank]] and slightly modified to suit my needs. @@ -345,6 +363,7 @@ All of this should be loaded lazily. (provide 'my/init-org) (with-eval-after-load "org" <<org-mode-part1>> + <<org-mode-faces>> <<org-mode-pretty>> ) (require 'org) |