Configure org-mode fonts
This commit is contained in:
73
README.org
73
README.org
@@ -242,6 +242,34 @@ Set up the fonts to use.
|
||||
(set-face-attribute 'default nil :font "Fantasque Sans Mono-12")
|
||||
(set-face-attribute 'fixed-pitch nil :font "Fantasque Sans Mono-12")
|
||||
(set-face-attribute 'variable-pitch nil :font "Fantasque Sans Mono-12")
|
||||
|
||||
|
||||
(let* ((variable-tuple
|
||||
(cond ((x-list-fonts "Calibri") '(:font "Calibri"))
|
||||
((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro"))
|
||||
((x-list-fonts "Lucida Grande") '(:font "Lucida Grande"))
|
||||
((x-list-fonts "Verdana") '(:font "Verdana"))
|
||||
((x-family-fonts "Sans Serif") '(:family "Sans Serif"))
|
||||
(nil (warn "Cannot find a Sans Serif Font. Install Source Sans Pro."))))
|
||||
(base-font-color (face-foreground 'default nil 'default))
|
||||
(headline `(:inherit default :weight bold :foreground ,base-font-color)))
|
||||
|
||||
(custom-theme-set-faces
|
||||
'user
|
||||
`(org-level-8 ((t (,@headline ,@variable-tuple))))
|
||||
`(org-level-7 ((t (,@headline ,@variable-tuple))))
|
||||
`(org-level-6 ((t (,@headline ,@variable-tuple))))
|
||||
`(org-level-5 ((t (,@headline ,@variable-tuple))))
|
||||
`(org-level-4 ((t (,@headline ,@variable-tuple :height 1))))
|
||||
`(org-level-3 ((t (,@headline ,@variable-tuple :height 1))))
|
||||
`(org-level-2 ((t (,@headline ,@variable-tuple :height 1))))
|
||||
`(org-level-1 ((t (,@headline ,@variable-tuple :height 1))))
|
||||
`(org-document-title ((t (,@headline ,@variable-tuple :height 2.0 :underline nil))))))
|
||||
|
||||
(custom-theme-set-faces
|
||||
'user
|
||||
'(variable-pitch ((t (:family "Calibri" :height 120 :weight thin))))
|
||||
'(fixed-pitch ((t ( :family "Fantasque Sans Mono" :height 120)))))
|
||||
#+end_src
|
||||
|
||||
* Completion
|
||||
@@ -376,26 +404,31 @@ Don't prompt to save unmodified buffers on exit.
|
||||
#+END_SRC
|
||||
|
||||
* Org Mode
|
||||
This is the main configuration for the infamous org-mode.
|
||||
The most important parts are configuring key bindings to quickly access the files we have defined above.
|
||||
Configuration to make org-mode better as a word processor
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; (use-package org
|
||||
;; :straight t
|
||||
;; ;; Always get this from the GNU archive.
|
||||
;; :bind (:map org-mode-map
|
||||
;; ("M-s-<return>" . org-insert-todo-heading)
|
||||
;; ("M-<return>" . org-insert-heading-respect-content)
|
||||
;; ("C-c a s" . org-emphasize)
|
||||
;; ("C-c -" . org-edit-special))
|
||||
;; :hook ((org-mode . visual-line-mode)
|
||||
;; (org-mode . org-indent-mode))
|
||||
;; :config
|
||||
;; (setq org-pretty-entities t
|
||||
;; org-indent-mode t
|
||||
;; org-hide-leading-stars nil
|
||||
;; org-link-file-path-type 'relative
|
||||
;; org-hide-emphasis-markers t
|
||||
;; )
|
||||
(setq org-hide-emphasis-markers t)
|
||||
|
||||
(font-lock-add-keywords 'org-mode
|
||||
'(("^ *\\([-]\\) "
|
||||
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
|
||||
|
||||
(add-hook 'org-mode-hook 'variable-pitch-mode)
|
||||
(add-hook 'org-mode-hook 'visual-line-mode)
|
||||
|
||||
(custom-theme-set-faces
|
||||
'user
|
||||
'(org-block ((t (:inherit fixed-pitch))))
|
||||
'(org-code ((t (:inherit (shadow fixed-pitch)))))
|
||||
'(org-document-info ((t (:foreground "dark orange"))))
|
||||
'(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
|
||||
'(org-indent ((t (:inherit (org-hide fixed-pitch)))))
|
||||
'(org-link ((t (:foreground "royal blue" :underline t))))
|
||||
'(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch)))))
|
||||
'(org-property-value ((t (:inherit fixed-pitch))) t)
|
||||
'(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
|
||||
'(org-table ((t (:inherit fixed-pitch :foreground "#83a598"))))
|
||||
'(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
|
||||
'(org-verbatim ((t (:inherit (shadow fixed-pitch))))))
|
||||
#+END_SRC
|
||||
|
||||
** Archive Location
|
||||
@@ -515,7 +548,7 @@ Ag.el allows you to search using ~ag~ from inside Emacs. You can filter by file
|
||||
(add-hook 'prog-mode-hook 'copilot-mode)
|
||||
(define-key copilot-completion-map (kbd "<tab>") 'copilot-accept-completion)
|
||||
(define-key copilot-completion-map (kbd "TAB") 'copilot-accept-completion)
|
||||
(define-key copilot-completion-map (kbd "M--") 'copilot-complete)
|
||||
(define-key copilot-completion-map (kbd "M--") 'copilot-complete)
|
||||
#+end_src
|
||||
|
||||
** Elisp
|
||||
|
||||
Reference in New Issue
Block a user