diff --git a/hosts/macbook/home.nix b/hosts/macbook/home.nix index d391d8a..bf25e41 100644 --- a/hosts/macbook/home.nix +++ b/hosts/macbook/home.nix @@ -45,17 +45,13 @@ }; home.packages = with pkgs; [ - taskwarrior-tui hidden-bar presenterm (azure-cli.withExtensions [ azure-cli.extensions.containerapp ]) - azure-functions-core-tools - dotnet-sdk - watchman - typescript-language-server - scrcpy + scrcpy + nh ]; programs.home-manager.enable = true; diff --git a/modules/home-manager/emacs/default.nix b/modules/home-manager/emacs/default.nix index 98410fc..94e27b8 100644 --- a/modules/home-manager/emacs/default.nix +++ b/modules/home-manager/emacs/default.nix @@ -16,6 +16,7 @@ cmake libtool glibtool + graphviz ]; programs.emacs = { diff --git a/modules/home-manager/emacs/emacs/init.el b/modules/home-manager/emacs/emacs/init.el index 96947e0..6776d51 100644 --- a/modules/home-manager/emacs/emacs/init.el +++ b/modules/home-manager/emacs/emacs/init.el @@ -131,8 +131,7 @@ (org-outline-path-complete-in-steps nil) :config (setq org-directory "~/org") - ;;(setq org-agenda-files (list "everything.org")) - (add-to-list 'org-tags-exclude-from-inheritance "project") + (setq org-agenda-files (list "todo.org")) :hook (org-mode . org-indent-mode) :init @@ -143,51 +142,98 @@ :straight t :hook (org-mode . toc-org-mode)) -(use-package org-roam +;; (use-package org-roam +;; :ensure t +;; :straight t +;; :custom +;; (org-roam-directory (file-truename "~/org")) +;; (org-roam-capture-templates +;; '(("d" "default" plain "%?" +;; :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" +;; "#+title: ${title}\n#+date: %U\n")) +;; ("p" "project" plain "* People\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n" +;; :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+category: ${title}\n#+filetags: project") +;; :unnarrowed t))) +;; (org-roam-dailies-capture-templates +;; '(("d" "default" entry "* %<%I:%M %p>: %?" +;; :if-new (file+head "%<%Y-%m-%d>.org" +;; "#+title: %<%Y-%m-%d>\n") +;; :unnarrowed t))) +;; :bind (("C-c n l" . org-roam-buffer-toggle) +;; ("C-c n f" . org-roam-node-find) +;; ("C-c n g" . org-roam-graph) +;; ("C-c n i" . org-roam-node-insert) +;; ("C-c n c" . org-roam-capture) +;; ("C-c n b" . mthomson/org-roam-capture-inbox) +;; ;; Dailies +;; ("C-c n j" . org-roam-dailies-capture-today)) +;; :config +;; ;; If you're using a vertical completion framework, you might want a more informative completion interface +;; (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) +;; (org-roam-db-autosync-mode) +;; ;; If using org-roam-protocol +;; (require 'org-roam-protocol) +;; (defun mthomson/org-roam-filter-by-tag (tag-name) +;; (lambda (node) +;; (member tag-name (org-roam-node-tags node)))) + +;; (defun mthomson/org-roam-list-notes-by-tag (tag-name) +;; (mapcar #'org-roam-node-file +;; (seq-filter +;; (mthomson/org-roam-filter-by-tag tag-name) +;; (org-roam-node-list)))) + +;; (defun mthomson/org-roam-refresh-agenda-list () +;; (interactive) +;; (setq org-agenda-files (mthomson/org-roam-list-notes-by-tag "project"))) + +;; (advice-add 'org-agenda :before #'mthomson/org-roam-refresh-agenda-list) +;; (advice-add 'org-todo-list :before #'mthomson/org-roam-refresh-agenda-list) +;; (advice-add 'org-refile :before #'mthomson/org-roam-refresh-agenda-list) + +;; (defun mthomson/org-roam-capture-inbox () +;; (interactive) +;; (org-roam-capture- :node (org-roam-node-create) +;; :templates '(("i" "inbox" plain "* %?" +;; :if-new (file+head "Inbox.org" "#+title: Inbox\n")))))) + +(use-package denote :ensure t :straight t - :custom - (org-roam-directory (file-truename "~/org")) - (org-roam-capture-templates - '(("d" "default" plain "%?" - :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" - "#+title: ${title}\n") - :unnarrowed t))) - :bind (("C-c n l" . org-roam-buffer-toggle) - ("C-c n f" . org-roam-node-find) - ("C-c n g" . org-roam-graph) - ("C-c n i" . org-roam-node-insert) - ("C-c n c" . org-roam-capture) - ;; Dailies - ("C-c n j" . org-roam-dailies-capture-today)) + :hook + ((dired-mode . denote-dired-mode) + (text-mode . denote-fontify-links-mode)) + :bind + (("C-c n n" . denote) + ("C-c n r" . denote-rename-file) + ("C-c n l" . denote-link) + ("C-c n b" . denote-backlinks) + ("C-c n d" . denote-dired)) :config - ;; If you're using a vertical completion framework, you might want a more informative completion interface - (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) - (org-roam-db-autosync-mode) - ;; If using org-roam-protocol - (require 'org-roam-protocol) - (defun mthomson/project-files () - "Return a list of note files containing 'project' tag." ; - (seq-uniq - (seq-map - #'car - (org-roam-db-query - [:select [nodes:file] - :from tags - :left-join nodes - :on (= tags:node-id nodes:id) - :where (like tag (quote "%\"project\"%"))])))) + (setq denote-directory (expand-file-name "~/org/note")) + (denote-rename-buffer-mode 1)) - (defun mthomson/agenda-files-update (&rest _) - "Update the value of `org-agenda-files'." - (setq org-agenda-files (mthomson/project-files)) - (setq org-refile-targets - '((nil :maxlevel . 3) - (org-agenda-files :maxlevel . 3)))) +(use-package consult-denote + :ensure t + :straight t + :bind + (("C-c n f" . consult-denote-find) + ("C-c n g" . consult-denote-grep)) + :config + (consult-denote-mode 1)) - (advice-add 'org-agenda :before #'mthomson/agenda-files-update) - (advice-add 'org-todo-list :before #'mthomson/agenda-files-update) - (advice-add 'org-refile :before #'mthomson/agenda-files-update)) +(use-package denote-journal + :ensure t + :straight t + :commands ( denote-journal-new-entry + denote-journal-new-or-existing-entry + denote-journal-link-or-create-entry ) + :hook (calendar-mode . denote-journal-calendar-mode) + :config + (setq denote-journal-directory + (expand-file-name "journal" denote-directory)) + (setq denote-journal-keyword "journal") + (setq denote-journal-title-format 'day-date-month-year)) (use-package org-superstar :ensure t