3.0 KiB
3.0 KiB
Org Mode
This the Mode with multitude of useful features like this configuration being a literate document, scheduling, and loads of other stuff
General Settings
(defun org-config-setup ()
(variable-pitch-mode)
(visual-line-mode) ;; wrap line
(org-indent-mode) ;; fake indentations
(setq org-hide-leading-stars nil)
(display-line-numbers-mode -1)
(display-fill-column-indicator-mode -1))
Font Setup
Set different types of fonts for differents elements of Org-mode files, like variable pitch for regular text, and fixed pitch for code blocks
(defun org-config-font-setup ()
"set org mode element fonts"
(custom-set-faces
'(org-block ((t (:inherit fixed-pitch :height 0.91))))
;; '(org-block-begin-line ((t (:inherit fixed-pitch))))
;; '(org-block-end-line ((t (:inherit fixed-pitch))))
'(org-checkbox ((t (:inherit fixed-pitch :height 0.91))))
'(org-code ((t (:inherit (shadow fixed-pitch) :height 0.91))))
'(org-document-info ((t (:foreground "dark orange"))))
'(org-document-info-keyword ((t (:inherit (shadow fixed-pitch) :height 0.91))))
'(org-indent ((t (:inherit (org-hide fixed-pitch) :height 0.91))))
'(org-link ((t (:foreground "royal blue" :underline t))))
'(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.91))))
'(org-property-value ((t (:inherit fixed-pitch :height 0.91))) t)
'(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.91))))
'(org-table ((t (:inherit fixed-pitch :foreground "#83a598" :height 0.91))))
'(org-tag ((t (:inherit (shadow fixed-pitch) :height 0.91 :weight bold :height 0.8))))
'(org-verbatim ((t (:inherit (shadow fixed-pitch) :height 0.91))))))
Header Font Setup
Make header and document title fonts bigger for better visibility.
(defun org-config-level-font-setup ()
"set header/level and document title fonts"
(custom-set-faces
'(org-document-title ((t
(:inherit (bold variable-pitch)
:height 2.2))))
'(org-level-1 ((t (:inherit outline-1 :weight bold
:height 1.5))))
'(org-level-2 ((t (:inherit outline-2 :weight bold
:height 1.4))))
'(org-level-3 ((t (:inherit outline-3 :weight bold
:height 1.3))))
'(org-level-4 ((t (:inherit variable-pitch :weight bold
:height 1.2))))
'(org-level-5 ((t (:inherit variable-pitch :weight bold
:height 1.1))))))
Load Package
(use-package org
:custom
(org-hide-emphasis-markers nil)
(org-agenda-files
`(,(expand-file-name "shared/org" (safe-getenv "HOME" user-home-path))))
:config
;; font setup
(org-config-font-setup)
(org-config-level-font-setup)
;;other settings
:hook (org-mode . org-config-setup))