diff options
author | William Carroll <wpcarro@gmail.com> | 2019-10-09T11·13+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2019-12-24T15·21+0000 |
commit | 6b456c1b7a4f6899f063a6e65355af51901d9c7a (patch) | |
tree | cfc70d74818ae9fabdbbfb0cf16cce092e4c1a09 /configs/shared/.emacs.d/wpc/packages/wpc-org.el | |
parent | a7c72adb2ebec1e497fc040eaf3551d564d61a5b (diff) |
Massive configuration overhaul
Currently paying the price of months of non-diligent git usage. Here's what has changed. - Theming support in Gvcci and wpgtk - Dropping support for i3 - Supporting EXWM - Many Elisp modules - Collapsed redundant directories in ./configs
Diffstat (limited to 'configs/shared/.emacs.d/wpc/packages/wpc-org.el')
-rw-r--r-- | configs/shared/.emacs.d/wpc/packages/wpc-org.el | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-org.el b/configs/shared/.emacs.d/wpc/packages/wpc-org.el new file mode 100644 index 000000000000..d1d981a3ea25 --- /dev/null +++ b/configs/shared/.emacs.d/wpc/packages/wpc-org.el @@ -0,0 +1,78 @@ +;;; org.el --- My org preferences -*- lexical-binding: t -*- +;; Author: William Carroll <wpcarro@gmail.com> + +;;; Commentary: +;; Hosts my org mode preferences + +;;; Code: + +;; TODO: figure out how to nest this in (use-package org ...) +(setq org-capture-templates + `( + + ("w" "work" entry (file+headline + ,(f-join (getenv "ORG_DIRECTORY") "work.org") + "Tasks") + "* TODO %?") + + ("p" "personal" entry (file+headline + ,(f-join (getenv "ORG_DIRECTORY") "personal.org") + "Tasks") + "* TODO %? ") + + ("i" "ideas" entry (file+headline + ,(f-join (getenv "ORG_DIRECTORY") "ideas.org") + "Tasks") + "* %? ") + + ("s" "shopping list" entry (file+headline + ,(f-join (getenv "ORG_DIRECTORY") "shopping.org") + "Items") + "* TODO %? ") + + )) +(evil-set-initial-state 'org-mode 'normal) + +(use-package org + :config + (general-add-hook 'org-mode-hook + ;; TODO: consider supporting `(disable (list linum-mode company-mode))' + (list (disable linum-mode) + (disable company-mode))) + (general-define-key :prefix "C-c" + "l" #'org-store-link + "a" #'org-agenda + "c" #'org-capture) + (setq org-startup-folded nil) + (setq org-todo-keywords + '((sequence "TODO" "BLOCKED" "DONE"))) + (setq org-default-notes-file (f-join (getenv "ORG_DIRECTORY") "notes.org")) + (setq org-agenda-files (list (f-join (getenv "ORG_DIRECTORY") "work.org") + (f-join (getenv "ORG_DIRECTORY") "personal.org"))) + ;; TODO: troubleshoot why `wpc/kbds-minor-mode', `wpc/ensure-kbds' aren't + ;; enough to override the following KBDs. See this discussion for more context + ;; on where the idea came from: + ;; https://stackoverflow.com/questions/683425/globally-override-key-binding-in-emacs + (general-unbind 'normal org-mode-map "M-h" "M-j" "M-k" "M-l")) + +(use-package org-bullets + :after (org) + :config + (general-add-hook 'org-mode-hook (enable org-bullets-mode))) + +;; i3, `org-mode' integration +;; Heavily influenced by: https://somethingsomething.us/post/i3_and_orgmode/ +;; TODO: Consider generalizing this since we're using "floating". +(defadvice org-switch-to-buffer-other-window + (after supress-window-splitting activate) + "Delete the extra window if we're in a capture frame." + (if (equal "floating" (wpc/frame-name)) + (delete-other-windows))) + +(add-hook 'org-capture-after-finalize-hook + (lambda () + (when (equal "floating" (wpc/frame-name)) + (delete-frame)))) + +(provide 'wpc-org) +;;; wpc-org.el ends here |