From f2e4470aaaaef9bc31619c071f73679087738110 Mon Sep 17 00:00:00 2001 From: William Moore Date: Sat, 21 Dec 2024 22:05:52 -0600 Subject: [PATCH] Updates --- init.el | 4 ++-- whomp/whomp-orgmode.el | 26 +++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index f3197eb..71d736e 100644 --- a/init.el +++ b/init.el @@ -32,13 +32,13 @@ (setq browse-url-browser-function 'browse-url) -(setq custom-init "~/.emacs.d/custom-init.el") +(setq custom-init (locate-user-emacs-file "custom-init.el")) (unless (file-exists-p custom-init) (whomp/ensure-file-exists custom-init)) (load-file custom-init) -(setq custom-file "~/.emacs.d/custom-config.el") +(setq custom-file (locate-user-emacs-file "custom-config.el")) (unless (file-exists-p custom-file) (whomp/ensure-file-exists custom-file)) diff --git a/whomp/whomp-orgmode.el b/whomp/whomp-orgmode.el index b3c8ad6..4076f1a 100644 --- a/whomp/whomp-orgmode.el +++ b/whomp/whomp-orgmode.el @@ -13,7 +13,8 @@ (const :tag "Org-Download" orgdownload) (const :tag "Org-Transclusion" orgtransclusion) (const :tag "Org-Roam" orgroam) - (const :tag "Org-Publish" orgpublish)) + (const :tag "Org-Publish" orgpublish) + (const :tag "Org-Present" orgpresent)) :group 'whomp-config) ;; org-babel extras @@ -194,6 +195,29 @@ (add-to-list 'org-babel-load-languages '(mermaid . t)) (message "ob-mermaid loaded")) +;; org-present +(when (and (memq 'orgmode whomp-orgmode) (memq 'orgpresent whomp-orgmode)) + (use-package org-present + :straight t + :defer t) + (use-package visual-fill-column + :straight t + :defer t) + (setq visual-fill-column-width 110 + visual-fill-column-center-text t) + + ;; Center the presentation and wrap + (defun whomp/org-present-start() + (visual-fill-column-mode 1) + (visual-line-mode 1)) + + ;; Stop centering and wrapping + (defun whomp/org-present-end() + (visual-fill-column-mode 0) + (visual-line-mode 0)) + (add-hook 'org-present-mode-hook 'whomp/org-present-start) + (add-hook 'org-present-mode-quit-hook 'whomp/org-present-end)) + (message "W.H.O.M.P. Org-Mode settings loaded") (provide 'whomp-orgmode) ;; whomp-orgmode.el ends here