adding some tweaks and dired-sidebar

This commit is contained in:
Chris Cochrun 2023-04-11 09:40:53 -05:00
parent 9e16c36629
commit b44cc3faac
2 changed files with 93 additions and 11 deletions

48
init.el
View file

@ -271,7 +271,9 @@
"C-S-l" 'evil-window-increase-width
"C-S-j" 'evil-window-decrease-height
"C-S-k" 'evil-window-increase-height
"C-S-h" 'evil-window-decrease-width)
"C-S-h" 'evil-window-decrease-width
"zi" 'text-scale-increase
"zd" 'text-scale-decrease)
(general-def 'normal Info-mode-map
"RET" 'Info-follow-nearest-node
"p" 'Info-prev
@ -719,6 +721,16 @@ much faster. The hope is to also make this a faster version of imenu."
:file-name "%<%Y-%m-%d>-bib"
:target (file+head "%<%Y-%m-%d>-bib.org" "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun\n#+CREATED: %<%D - %I:%M %p>\n\n* Notes")
:unnarrowed t)))
(defun chris/org-roam-node-create ()
"Create an org roam node underneath this org node"
(interactive)
(+org/insert-item-below 1)
(org-id-get-create))
(defun chris/org-roam-node-id-create ()
"Make the basic org node and org roam one by adding an id and creating an alias"
(interactive)
(org-id-get-create)
(org-roam-alias-add))
;; (set-face-attribute 'magit-section-highlight nil :inherit 'variable-pitch)
(org-roam-setup)
:general
@ -727,11 +739,14 @@ much faster. The hope is to also make this a faster version of imenu."
:keymaps 'override
"nf" '(org-roam-node-find :which-key "org roam ff")
"nr" 'org-roam-buffer-toggle
"ni" 'org-roam-node-insert
"ni" 'chris/org-roam-node-create
"nl" 'org-roam-node-insert
"nc" 'org-roam-capture
"nt" 'org-roam-dailies-goto-today
"ng" 'org-roam-graph
"in" 'org-roam-node-insert)
"na" 'org-roam-alias-add
"in" 'org-roam-node-insert
"nA" 'chris/org-roam-node-id-create)
(chris/leader-keys
:states 'visual
:keymaps 'override
@ -1266,6 +1281,11 @@ All my (performant) foldings needs are met between this and `org-show-subtree'
(add-hook 'evil-insert-state-exit-hook #'org-update-parent-todo-statistics nil t))
(add-hook 'before-save-hook #'org-update-parent-todo-statistics nil t))
(general-def 'normal org-mode-map
"C-<return>" '+org/insert-item-below)
(general-def 'insert org-mode-map
"C-<return>" '+org/insert-item-below)
(use-package org-re-reveal
:ensure nil
:config
@ -1771,6 +1791,10 @@ targets."
(display-buffer-in-side-window)
(side . right)
(window-width . 0.4))
("*dired-side*"
(display-buffer-in-side-window)
(side . left)
(window-width . 0.3))
("*org-roam*"
(display-buffer-in-side-window)
(side . right)
@ -1998,7 +2022,8 @@ targets."
:mode ("\\.fish\\'" . fish-mode))
(use-package markdown-mode
:mode ("\\.md\\'" . markdown-mode)
:mode (("\\.md\\'" . markdown-mode)
("\\.rmd\\'". markdown-mode))
:config
(setq markdown-fontify-code-blocks-natively t)
(add-hook 'markdown-mode-hook 'chris/org-mode-setup)
@ -2087,6 +2112,12 @@ targets."
(visual-line-mode nil)
(dired-hide-details-mode t))
(defun chris/open-dired-sidewindow ()
"Open dired as a side window to the main window on the left"
(interactive)
(with-current-buffer (get-buffer-create "dired-side")
(dired-jump)))
(setq dired-dwim-target t
delete-by-moving-to-trash t
dired-mouse-drag-files t)
@ -2114,6 +2145,13 @@ targets."
(let* ((file (dired-get-filename)))
(clipboard-kill-ring-save nil nil file)))
(use-package dired-sidebar
:ensure t
:commands (dired-sidebar-toggle-sidebar)
:general
(general-def 'normal
"gD" 'dired-sidebar-toggle-sidebar))
(use-package all-the-icons-dired
:hook (dired-mode . all-the-icons-dired-mode))
@ -2264,7 +2302,7 @@ targets."
(setq mu4e-bookmarks
'((:name "Unread messages"
:query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" AND NOT maildir:\"/office/Archive\" AND NOT maildir:\"/outlook/Archive\" AND NOT maildir:\"/cochrun/Archive\""
:query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" AND NOT maildir:\"/office/Archive\" AND NOT maildir:\"/outlook/Archive\" AND NOT maildir:\"/cochrun/Archive\" AND NOT maildir:\"/cochrun/Junk\""
:key 117)
(:name "Today's messages"
:query "date:today..now"