mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Stops rebuild on every change + better org-agenda-roam
This commit is contained in:
parent
42afdcbd89
commit
0e512ca58c
|
@ -628,6 +628,13 @@ same directory as the org-buffer and insert a link to this file."
|
|||
;; Build agenda for first time during this session
|
||||
(org-roam-refresh-agenda-list)
|
||||
|
||||
|
||||
(map! :leader
|
||||
:prefix ("o a")
|
||||
|
||||
:desc "Refresh org agenda from roam dbs"
|
||||
"r" 'org-roam-refresh-agenda-list)
|
||||
|
||||
(map! :leader
|
||||
:prefix ("N" . "org-roam notes")
|
||||
|
||||
|
@ -762,6 +769,24 @@ same directory as the org-buffer and insert a link to this file."
|
|||
:desc "Open org calendar"
|
||||
"o c" #'cfw:open-org-calendar)
|
||||
|
||||
(defun org-agenda-switch-with-roam ()
|
||||
"Switches to org roam node file and database from org agenda view"
|
||||
(interactive)
|
||||
(org-agenda-switch-to)
|
||||
(if (f-exists-p (concat (dir!) "/org-roam.db"))
|
||||
(org-roam-switch-db (f-filename (f-parent (dir!))) t))
|
||||
(org-roam-olivetti-mode)
|
||||
)
|
||||
|
||||
(map!
|
||||
:map evil-org-agenda-mode-map
|
||||
:after org-agenda
|
||||
:nvmeg "<RET>" #'org-agenda-switch-with-roam)
|
||||
(map!
|
||||
:map org-agenda-mode-map
|
||||
:after org-agenda
|
||||
:nvmeg "<RET>" #'org-agenda-switch-with-roam)
|
||||
|
||||
(require 'org-super-agenda)
|
||||
|
||||
(setq org-super-agenda-groups
|
||||
|
@ -867,6 +892,13 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)."
|
|||
"q" '+magit/quit
|
||||
(kbd "<return>") 'magit-visit-ref)
|
||||
|
||||
(evil-set-initial-state 'ibuffer-mode 'normal)
|
||||
(evil-define-key 'normal 'ibuffer-mode
|
||||
"j" 'evil-next-visual-line
|
||||
"k" 'evil-previous-visual-line
|
||||
"q" 'kill-buffer
|
||||
(kbd "<return>") 'ibuffer-visit-buffer)
|
||||
|
||||
;;;------ dired configuration ------;;;
|
||||
|
||||
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
|
||||
|
|
|
@ -6,6 +6,30 @@ in
|
|||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomPrivateDir = ./.;
|
||||
# This block from https://github.com/znewman01/dotfiles/blob/be9f3a24c517a4ff345f213bf1cf7633713c9278/emacs/default.nix#L12-L34
|
||||
# Only init/packages so we only rebuild when those change.
|
||||
doomPackageDir = let
|
||||
filteredPath = builtins.path {
|
||||
path = ./.;
|
||||
name = "doom-private-dir-filtered";
|
||||
filter = path: type:
|
||||
builtins.elem (baseNameOf path) [ "init.el" "packages.el" ];
|
||||
};
|
||||
in pkgs.linkFarm "doom-packages-dir" [
|
||||
{
|
||||
name = "init.el";
|
||||
path = "${filteredPath}/init.el";
|
||||
}
|
||||
{
|
||||
name = "packages.el";
|
||||
path = "${filteredPath}/packages.el";
|
||||
}
|
||||
{
|
||||
name = "config.el";
|
||||
path = pkgs.emptyFile;
|
||||
}
|
||||
];
|
||||
# End block
|
||||
};
|
||||
|
||||
home.file.".emacs.d/themes/doom-stylix-theme.el".source = config.lib.stylix.colors {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
- [[#org-roam-configuration][Org Roam Configuration]]
|
||||
- [[#org-agenda-configuration][Org Agenda Configuration]]
|
||||
- [[#magit-configuration][Magit Configuration]]
|
||||
- [[#ibuffer-configuration][Ibuffer Configuration]]
|
||||
- [[#dired-configuration][Dired Configuration]]
|
||||
- [[#ranger-configuration][Ranger Configuration]]
|
||||
- [[#hledger-mode-configuration][hledger-mode Configuration]]
|
||||
|
@ -949,6 +950,14 @@ styletree.write('styles.xml')
|
|||
;; Build agenda for first time during this session
|
||||
(org-roam-refresh-agenda-list)
|
||||
|
||||
|
||||
(map! :leader
|
||||
:prefix ("o a")
|
||||
|
||||
:desc "Refresh org agenda from roam dbs"
|
||||
"r" 'org-roam-refresh-agenda-list)
|
||||
|
||||
|
||||
#+END_SRC
|
||||
*** Org Roam Keybindings
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
|
@ -1001,7 +1010,7 @@ styletree.write('styles.xml')
|
|||
(add-hook 'org-mode-hook 'org-roam-olivetti-mode)
|
||||
|
||||
#+END_SRC
|
||||
*** TODO Org Roam Dynamic Blocks
|
||||
*** Org Roam Dynamic Blocks
|
||||
This needs fixing on NixOS:
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
(add-load-path! "~/.emacs.d/org-nursery/lisp")
|
||||
|
@ -1015,7 +1024,7 @@ This needs fixing on NixOS:
|
|||
(setq org-id-extra-files 'org-agenda-text-search-extra-files)
|
||||
|
||||
#+END_SRC
|
||||
*** TODO Org Roam UI Setup
|
||||
*** Org Roam UI Setup
|
||||
I want this to be able to automatically open ORUI in EAF Browser in a split to the right. This kinda works now?
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
;(add-to-list 'display-buffer-alist '("^\\ORUI" display-buffer-in-side-window
|
||||
|
@ -1110,6 +1119,24 @@ I want this to be able to automatically open ORUI in EAF Browser in a split to t
|
|||
:desc "Open org calendar"
|
||||
"o c" #'cfw:open-org-calendar)
|
||||
|
||||
(defun org-agenda-switch-with-roam ()
|
||||
"Switches to org roam node file and database from org agenda view"
|
||||
(interactive)
|
||||
(org-agenda-switch-to)
|
||||
(if (f-exists-p (concat (dir!) "/org-roam.db"))
|
||||
(org-roam-switch-db (f-filename (f-parent (dir!))) t))
|
||||
(org-roam-olivetti-mode)
|
||||
)
|
||||
|
||||
(map!
|
||||
:map evil-org-agenda-mode-map
|
||||
:after org-agenda
|
||||
:nvmeg "<RET>" #'org-agenda-switch-with-roam)
|
||||
(map!
|
||||
:map org-agenda-mode-map
|
||||
:after org-agenda
|
||||
:nvmeg "<RET>" #'org-agenda-switch-with-roam)
|
||||
|
||||
#+END_SRC
|
||||
*** Org Super Agenda Configuration
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
|
@ -1222,6 +1249,15 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)."
|
|||
(kbd "<return>") 'magit-visit-ref)
|
||||
|
||||
#+END_SRC
|
||||
** Ibuffer Configuration
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
(evil-set-initial-state 'ibuffer-mode 'normal)
|
||||
(evil-define-key 'normal 'ibuffer-mode
|
||||
"j" 'evil-next-visual-line
|
||||
"k" 'evil-previous-visual-line
|
||||
"q" 'kill-buffer
|
||||
(kbd "<return>") 'ibuffer-visit-buffer)
|
||||
#+END_SRC
|
||||
** Dired Configuration
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
;;;------ dired configuration ------;;;
|
||||
|
@ -1615,6 +1651,30 @@ in
|
|||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomPrivateDir = ./.;
|
||||
# This block from https://github.com/znewman01/dotfiles/blob/be9f3a24c517a4ff345f213bf1cf7633713c9278/emacs/default.nix#L12-L34
|
||||
# Only init/packages so we only rebuild when those change.
|
||||
doomPackageDir = let
|
||||
filteredPath = builtins.path {
|
||||
path = ./.;
|
||||
name = "doom-private-dir-filtered";
|
||||
filter = path: type:
|
||||
builtins.elem (baseNameOf path) [ "init.el" "packages.el" ];
|
||||
};
|
||||
in pkgs.linkFarm "doom-packages-dir" [
|
||||
{
|
||||
name = "init.el";
|
||||
path = "${filteredPath}/init.el";
|
||||
}
|
||||
{
|
||||
name = "packages.el";
|
||||
path = "${filteredPath}/packages.el";
|
||||
}
|
||||
{
|
||||
name = "config.el";
|
||||
path = pkgs.emptyFile;
|
||||
}
|
||||
];
|
||||
# End block
|
||||
};
|
||||
|
||||
home.file.".emacs.d/themes/doom-stylix-theme.el".source = config.lib.stylix.colors {
|
||||
|
|
Loading…
Reference in a new issue