summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-06-03 06:56:30 +0300
committerThanos Apollo <[email protected]>2023-06-03 06:56:30 +0300
commitf358e2ef5192784db7a52b4c3c249e993ce1e730 (patch)
treebf6501f71fc9f0bc98c0df8dba6514202cb500b7
parentb1ba34471a2881e0243ec7b9b27f259dfb2f3bfd (diff)
emacs: Update org-roam configuration
- Update keybindings with C-c n instead of `thanos/applications` - Create ~/Notes for org-roam if not already made - Clean code
-rwxr-xr-xemacs.org31
1 files changed, 26 insertions, 5 deletions
diff --git a/emacs.org b/emacs.org
index 6709cfb..47e5e65 100755
--- a/emacs.org
+++ b/emacs.org
@@ -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