FIX all config

This commit is contained in:
Alexandre LUCAZEAU 2023-06-08 09:39:18 +02:00
parent 45dce66310
commit 8de3cdf6a7
1 changed files with 51 additions and 75 deletions

View File

@ -114,72 +114,10 @@
org-image-actual-width '(300))
;; files with ".org" open in org-mode
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(setq org-agenda-files '("/home/alexandre/Nextcloud/PRIVE/13_Org/journal"))
(setq org-agenda-files '("/home/alexandre/Nextcloud/PRIVE/13_Org/backlog.org" "/home/alexandre/Nextcloud/PRIVE/13_Org/notes"))
(setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/13_Org/notes"))
(setq org-default-notes-file "~/Nextcloud/PRIVE/13_Org/backlog.org")
;;(setq org-capture-templates
;; '(("b" "Ajouter au backlog" entry
;; (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
;; "* TODO %?" :empty-lines 1))
(setq org-capture-templates
'(("t" "TODO" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %? %^G \n %U" :empty-lines 1)
("s" "Scheduled TODO" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %? %^G \nSCHEDULED: %^t\n %U" :empty-lines 1)
("l" "Link" entry (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %a %? %^G\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n")
("n" "Note" entry (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* %? %^G\n%U" :empty-lines 1)
("j" "Journal" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* %? %^G\nEntered on %U\n")))
;; Org-Roam basic configuration
(use-package org-roam
:after org
:init (setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
:custom
(org-roam-directory (file-truename org-directory))
:config
(org-roam-setup)
(org-roam-db-autosync-mode)
:bind (("C-c n f" . org-roam-node-find)
("C-c n r" . org-roam-node-random)
(:map org-mode-map
(("C-c n i" . org-roam-node-insert)
("C-c n o" . org-id-get-create)
("C-c n t" . org-roam-tag-add)
("C-c n a" . org-roam-alias-add)
("C-c n l" . org-roam-buffer-toggle)
("C-c n o" . org-open-at-point)
("C-M-i" . completion-at-point)))))
;; (:map org-roam-dailies-map
;; (("Y" . org-roam-dailies-capture-yesterday)
;; ("T" . org-roam-dailies-capture-tomorrow))))
(setq org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
;;:target (file+datetree "journal-2023.org" year))))
:target (file+head "journal-%<%Y>.org" "#+TITLE: %<%Y-%m-%d>\n"))))
;; :target (file+head "%<%Y-%m>.org" "#+TITLE: %<%Y-%m>\n"))))
;; one file org
(defvar org-gtd-file "~/Nextcloud/PRIVE/13_Org/DRI.org")
;; Open DRI.org when I hit C-c g
(defun gtd ()
"Open the GTD file."
(interactive)
(find-file org-gtd-file))
;; keybinding
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cg" 'gtd)
;; This seems like a good basic set of keywords to start out with:
(setq org-todo-keywords '((type "TODO" "En cours" "WAIT" "CANCELED" "DONE")))
(setf org-todo-keyword-faces '(("TODO" . (:foreground "cyan" :background "steelblue" :bold t :weight bold))
("En cours" . (:foreground "yellow" :background "red" :bold t :weight bold))
("En attente de réponse" . (:foreground "yellow" :background "magenta2" :bold t :weight bold))
@ -189,7 +127,6 @@
;; tags
(setq org-tag-alist '(("DEVIS" . ?d) ("PROJETS" . ?p) ("CLIENT" . ?c) ("PROSPECT" . ?o) ("INTERNE" . ?i) ("AO" . ?a) ("PJ" . ?z) ("AVV" . ?v)))
(setq org-tag-faces
'(
("DEVIS" . (:foreground "OrangeRed" :weight bold))
@ -201,14 +138,53 @@
("AO" . (:foreground "HotPink2" :weight bold))
)
)
;;; Org-journal
;; https://github.com/bastibe/org-journal
;; C-c C-j
(require 'org-journal)
(setq org-journal-date-prefix "#+TITLE: "
org-journal-carryover-items "-TODO=\"DONE\""
org-journal-time-prefix "* "
org-journal-date-format "%a, %Y-%m-%d"
org-journal-file-format "%Y-%m-%d-journal.org"
org-journal-dir "/home/alexandre/Nextcloud/PRIVE/13_Org/journal/")
(global-set-key "\C-cnj" 'org-journal-new-entry)
;; org-capture use to add note to backlog file. At the end of day, use org-refile to dispatch to good note
(setq org-capture-templates
'(("t" "TODO" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %? %^G \n %U" :empty-lines 1)
("s" "Scheduled TODO" entry (file+datetree "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %? %^G \nSCHEDULED: %^t\n %U" :empty-lines 1)
("l" "Link" entry (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* TODO %a %? %^G\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n")
("n" "Note" entry (file "~/Nextcloud/PRIVE/13_Org/backlog.org")
"* %? %^G\n%U" :empty-lines 1)))
;; Org-Roam basic configuration
(use-package org-roam
:after org
:init
(setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
:custom
(org-roam-directory (file-truename org-directory))
(org-roam-completion-everywhere t)
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n o" . org-open-at-point)
("C-c n j" . org-roam-dailies-capture-today)
("C-c n i" . org-roam-node-insert))
:config
(org-roam-setup)
(org-roam-db-autosync-mode)
)
;; Index org file and backlog file
(defvar org-gtd-file "~/Nextcloud/PRIVE/13_Org/DRI.org")
(defvar org-backlog-file "~/Nextcloud/PRIVE/13_Org/backlog.org")
;; Open DRI.org when I hit C-c g
(defun gtd ()
"Open the GTD file."
(interactive)
(find-file org-gtd-file))
;; Open backlog.org when I hit file hit C-c b
(defun gtb ()
"Open the backlog file."
(interactive)
(find-file org-backlog-file))
;; keybinding
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cg" 'gtd)
(global-set-key "\C-cb" 'gtb)