summaryrefslogtreecommitdiff
path: root/modules/org-appearance-config.el
blob: 7522b5c597377aa9566dd0abab4da5cd683a6932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
;;; org-appearance-config.el --- Org-Mode UI Appearance Settings -*- lexical-binding: t; -*-

;;; Commentary:
;;

;;; Code:

(with-eval-after-load 'org

  ;; face settings need to be called every time org mode is loaded.
  (defun cj/set-org-face-settings()
	"Sets foreground, background, and font styles for org mode.
To be called every time org is loaded."
	(interactive)
	;; org-hide should use fix-pitch to align indents for proportional fonts
	(set-face-attribute 'org-hide nil :inherit 'fixed-pitch)
	(set-face-attribute 'org-meta-line nil :inherit 'shadow)

	;; Remove foreground and background from block faces
	(set-face-attribute 'org-block nil :foreground 'unspecified :background 'unspecified)
	(set-face-attribute 'org-block-begin-line nil :foreground 'unspecified :background 'unspecified)
	(set-face-attribute 'org-block-end-line nil :foreground 'unspecified :background 'unspecified)

	;; Get rid of the background on column views
	(set-face-attribute 'org-column nil :background 'unspecified)
	(set-face-attribute 'org-column-title nil :background 'unspecified)

	;; make sure org-links are underlined
	(set-face-attribute 'org-link nil :underline t)

	;; remove hook after first run to avoid calling function  everytime a frame is made
	(if (daemonp)
		(remove-hook 'server-after-make-frame-hook  #'cj/set-org-face-settings)))

  ;; if emacsclient, setup hook to run font settings function, otherwise, run it now
  (if (daemonp)
	  (add-hook 'server-after-make-frame-hook #'cj/set-org-face-settings)
	(cj/set-org-face-settings))


  ;; settings need to be called only once
  (setq org-ellipsis " ▾")                                  ;; change ellipses to down arrow
  (setq org-hide-emphasis-markers t)                        ;; remove emphasis markers to keep the screen clean
  (setq org-hide-leading-stars t)                           ;; hide leading stars, just show one per line
  (setq org-pretty-entities t)                              ;; render special symbols
  (setq org-pretty-entities-include-sub-superscripts nil)   ;; ...except superscripts and subscripts
  (setq org-fontify-emphasized-text nil)                    ;; ...and don't render bold and italic markup
  (setq org-fontify-whole-heading-line t)                   ;; fontify the whole line for headings (for face-backgrounds)
  (add-hook 'org-mode-hook 'prettify-symbols-mode)



  ;; nicer bullets than simple asterisks.
  (use-package org-superstar
	:after org
	:config
	(org-superstar-configure-like-org-bullets)
	(setq org-superstar-leading-bullet ?\s)
	(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1))))

  ) ;; end with-eval-after-load

(provide 'org-appearance-config)
;;; org-appearance-config.el ends here.