adding and setting up dirvish

This commit is contained in:
Chris Cochrun 2022-03-09 06:12:20 -06:00
parent f9b30fcc24
commit 01bffe0db5
2 changed files with 49 additions and 21 deletions

View file

@ -1317,7 +1317,8 @@ I'm making a small function in here to open files in the appropriate program usi
(setq dired-dwim-target t)
(setq dired-listing-switches "-aoh --group-directories-first")
(setq dired-hide-details-hide-symlink-targets nil)
(setq dired-hide-details-hide-symlink-targets nil
dired-kill-when-opening-new-dired-buffer t)
(add-hook 'dired-mode-hook #'dired-hide-details-mode)
:general
@ -1389,7 +1390,46 @@ We need a function to copy the full filename to kill-ring
**** Dirvish
Let's try using dirvish as a kind of ranger
#+begin_src emacs-lisp :tangle no
(use-package dirvish
:after dired
:custom
(dirvish-bookmarks-alist
'(("h" "~/" "Home")
("d" "~/Downloads/" "Downloads")
("p" "~/Pictures/" "Pictures")
("D" "/dev/" "dev")
("t" "~/.local/share/Trash/files/" "TrashCan")))
:config
(dirvish-override-dired-mode)
(dirvish-peek-mode)
(setq dirvish-attributes '(all-the-icons file-size))
(defun chris/dirvish-quit ()
"quit a fullscreen dirvish if it's open, else do a normal kill buffer"
(interactive)
(if (dirvish-dired-p)
(kill-this-buffer)
(with-current-buffer
(current-buffer)
(dirvish-toggle-fullscreen))
(with-current-buffer
(current-buffer)
(kill-this-buffer))))
:general
(chris/leader-keys 'normal 'override
"od" 'dirvish :which-key "open dirvish here")
('normal 'dirvish-mode-map
"gf" 'dirvish-toggle-fullscreen
"RET" 'dirvish-find-file
"h" 'dirvish-up-directory
"l" 'dirvish-find-file
"b" 'dirvish-goto-bookmark
"?" 'dirvish-top-level-menu
"a" 'dirvish-file-info-menu
"A" 'dirvish-mark-actions-menu
"q" 'chris/dirvish-quit))
#+end_src
*** Tramp
#+begin_src emacs-lisp
@ -2606,7 +2646,9 @@ Matrix.el is a decent enough matrix client built in emacs. Like it.
:general
(general-def 'normal ement-room-mode-map
"q" 'bury-buffer
"RET" 'ement-room-send-message)
"RET" 'ement-room-send-message
"r" 'ement-room-send-reply
"R" 'ement-room-send-reaction)
(chris/leader-keys
"oM" 'ement-list-rooms))
#+end_src

24
init.el
View file

@ -815,7 +815,8 @@ targets."
(setq dired-dwim-target t)
(setq dired-listing-switches "-aoh --group-directories-first")
(setq dired-hide-details-hide-symlink-targets nil)
(setq dired-hide-details-hide-symlink-targets nil
dired-kill-when-opening-new-dired-buffer t)
(add-hook 'dired-mode-hook #'dired-hide-details-mode)
:general
@ -1940,7 +1941,9 @@ interfere with the default `bongo-playlist-buffer'."
:general
(general-def 'normal ement-room-mode-map
"q" 'bury-buffer
"RET" 'ement-room-send-message)
"RET" 'ement-room-send-message
"r" 'ement-room-send-reply
"R" 'ement-room-send-reaction)
(chris/leader-keys
"oM" 'ement-list-rooms))
@ -1984,20 +1987,3 @@ interfere with the default `bongo-playlist-buffer'."
gcmh-verbose nil))
(setq warning-suppress-types '((comp)))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(pdf-misc-print-program "/usr/bin/lpr" t)
'(pdf-misc-print-program-args '("-o media=Letter" "-o fitplot") t)
'(safe-local-variable-values
'((projectile-project-compilation-cmd . "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build/ . && make --dir build/")
(projectile-project-compilation-cmd . "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B buld/ . && make --dir build/")
(projectile-project-run-cmd . "./build/bin/presenter"))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)