diff options
author | William Carroll <wpcarro@gmail.com> | 2019-03-08T18·15+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2019-03-08T18·15+0000 |
commit | c487b09d6a1b054c3912397ec6cdbabd58d35eb0 (patch) | |
tree | d0ecc5473f4225599fdc97fa5644553b60c3826f /configs/shared/emacs | |
parent | c0b8167c2c852394b1fcdfc06f949bd57321b352 (diff) |
Support i3wm and org-capture integration
Now this has been missing from my workflow for awhile.
Diffstat (limited to 'configs/shared/emacs')
-rw-r--r-- | configs/shared/emacs/.emacs.d/wpc/packages/wpc-org.el | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/configs/shared/emacs/.emacs.d/wpc/packages/wpc-org.el b/configs/shared/emacs/.emacs.d/wpc/packages/wpc-org.el index c2682be5c158..dcbe06688519 100644 --- a/configs/shared/emacs/.emacs.d/wpc/packages/wpc-org.el +++ b/configs/shared/emacs/.emacs.d/wpc/packages/wpc-org.el @@ -6,16 +6,23 @@ ;;; Code: +;; TODO: figure out how to nest this in (use-package org ...) +(setq org-capture-templates + (quote ( + +("w" "work" entry (file+headline "~/Documents/org/work.org" "Tasks") + "* TODO %?") + +("p" "personal" entry (file+headline "~/Documents/org/personal.org" "Tasks") + "* TODO %? ") + +))) +(evil-set-initial-state 'org-mode 'insert) + (use-package org :preface (defconst wpc-org-directory - "~/Dropbox/org") - (defconst ub-org-directory - "~/Dropbox/sprint-planning-staging") - (defun wpc/org-file (file) - (f-join wpc-org-directory (f-swap-ext file "org"))) - (defun ub/org-file (file) - (f-join ub-org-directory (f-swap-ext file "org"))) + "~/Documents/org") :config ; (general-add-hook org-mode-hook (disable linum-mode)) (general-define-key :prefix "C-c" @@ -25,15 +32,25 @@ (setq org-default-notes-file (wpc/org-file "notes")) (setq org-log-done 'time) (setq org-agenda-files (list (wpc/org-file "work") - (wpc/org-file "personal"))) - (setq org-capture-templates - `(("t" "Todo" entry (file+heading ,(ub/org-file "index") "Ideas") - "* TODO %?\n %i")))) + (wpc/org-file "personal")))) (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/ +(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 "org-protocol-capture" (wpc/frame-name)) + (delete-other-windows))) + +(add-hook 'org-capture-after-finalize-hook + (lambda () + (when (equal "org-protocol-capture" (wpc/frame-name)) + (delete-frame)))) + (provide 'wpc-org) ;;; wpc-org.el ends here |