From 0754c6bf8fbe1a67b1974ec4aecb79e6a0946229 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 17 Jul 2018 02:22:35 -0700 Subject: [PATCH] Prettify checkboxes in org-mode --- emacs/.emacs.d/init/oni-org-init.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/emacs/.emacs.d/init/oni-org-init.el b/emacs/.emacs.d/init/oni-org-init.el index d1bbdfb..0c3fcc5 100644 --- a/emacs/.emacs.d/init/oni-org-init.el +++ b/emacs/.emacs.d/init/oni-org-init.el @@ -29,6 +29,15 @@ (require 'org-capture) (require 'org-habit) +(defun oni-org-init-setup-prettify-symbols-mode () + "Set up prettify symbols mode for org mode." + (when (member "Ionicons" (font-family-list)) + (setq-local prettify-symbols-alist + '(("[ ]" . #xf372) + ("[X]" . #xf374))) + (set-face-attribute 'org-checkbox nil :family "Ionicons") + (prettify-symbols-mode))) + (setq org-default-notes-file "~/documents/gtd/inbox.org") (setq org-src-fontify-natively t) (setq org-return-follows-link t) @@ -64,6 +73,7 @@ (add-hook 'org-mode-hook 'auto-fill-mode) (add-hook 'org-mode-hook 'org-bullets-mode) +(add-hook 'org-mode-hook #'oni-org-init-setup-prettify-symbols-mode) (provide 'oni-org-init) ;;; oni-org-init.el ends here