diff options
-rwxr-xr-x | emacs.org | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -331,15 +331,36 @@ Hook with ~dired-mode~ #+begin_src emacs-lisp (add-hook 'dired-mode-hook 'all-the-icons-dired-mode) #+end_src -* Org-mode +* Org ** Org-Roam #+begin_src emacs-lisp - ;; Set directory & autocompletions - (setq org-roam-directory "~/Notes") - ;; Activate autosync + ;; Create ~/Notes, ignore errors if it's already made + (ignore-error (make-directory "~/Notes")) + + (setq org-roam-directory "~/Notes" + org-roam-dailies-directory "journal/") + (org-roam-db-autosync-enable) +#+end_src +*** Keybindings +#+begin_src emacs-lisp + ;; Set maps + (define-prefix-command 'thanos/notes) + (global-set-key (kbd "C-c n") 'thanos/notes) + ;; org-roam keys + (define-key thanos/notes (kbd "t") 'org-roam-buffer-toggle) + (define-key thanos/notes (kbd "f") 'org-roam-node-find) + (define-key thanos/notes (kbd "i") 'org-roam-node-insert) ;; Journaling - (setq org-roam-dailies-directory "journal/") + (define-prefix-command 'Journal) + (define-key thanos/notes (kbd "j") 'Journal) + (define-key Journal (kbd "d") 'Journaling/dailies) + (define-key Journal (kbd "C-c") 'org-roam-dailies-capture-today) + (define-key Journal (kbd "C-t") 'org-roam-dailies-capture-tomorrow) + (define-key Journal (kbd "C-y") 'org-roam-dailies-capture-yesterday) + (define-key Journal (kbd "c") 'org-roam-dailies-goto-today) + (define-key Journal (kbd "t") 'org-roam-dailies-goto-tomorrow) + (define-key Journal (kbd "y") 'org-roam-dailies-goto-yesterday) #+end_src *** Templates #+begin_src emacs-lisp |