Support i3wm and org-capture integration
Now this has been missing from my workflow for awhile.
This commit is contained in:
parent
c0b8167c2c
commit
c487b09d6a
3 changed files with 49 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue