add dirvish config

This commit is contained in:
2025-07-13 22:35:56 +02:00
parent 0d1af13ccb
commit 90fe07db3a
2 changed files with 23 additions and 8 deletions

View File

@@ -107,7 +107,20 @@
:defer t
:config
;; tramp-cache.el
(setq tramp-persistency-file-name (concat user-cache-directory "tramp")))
(setq tramp-persistency-file-name (concat user-cache-directory "tramp"))
;; Enable full-featured Dirvish over TRAMP on ssh connections
;; https://www.gnu.org/software/tramp/#Improving-performance-of-asynchronous-remote-processes
(connection-local-set-profile-variables
'remote-direct-async-process
'((tramp-direct-async-process . t)))
(connection-local-set-profiles
'(:application tramp :protocol "ssh")
'remote-direct-async-process)
;; Tips to speed up connections
(setq tramp-verbose 0)
(setq tramp-chunksize 2000)
(setq tramp-ssh-controlmaster-options nil) )
(if (fboundp 'save-place-mode)
(save-place-mode)

View File

@@ -360,8 +360,7 @@ see `awesome-tray-mode-hook'"
;; automatically when opening a file
;; (put 'dired-find-alternate-file 'disabled nil)
(setq dired-mouse-drag-files t)
(setq mouse-drag-and-drop-region-cross-program t)
)
(setq mouse-drag-and-drop-region-cross-program t) )
(use-package dirvish
:defer t
@@ -392,7 +391,9 @@ see `awesome-tray-mode-hook'"
("<mouse-2>" . dired-mouse-find-file-other-window)
("<mouse-3>" . dired-mouse-find-file))
:config
(setq mouse-1-click-follows-link nil)
;; (setq mouse-1-click-follows-link 450)
;; (setq mouse-1-click-follows-link nil) ;; limit to dirvish-mode
(setq dirvish-use-mode-line nil)
(setq dirvish-quick-access-entries
'(("h" "~/" "Home")
("d" "~/Downloads/" "Downloads")
@@ -403,14 +404,15 @@ see `awesome-tray-mode-hook'"
))
;; (dirvish-peek-mode) ; Preview files in minibuffer
(dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
(setq dirvish-mode-line-format
'(:left (sort symlink) :right (omit yank index)))
;; (setq dirvish-mode-line-format
;; '(:left (sort symlink) :right (omit yank index)))
(setq dirvish-attributes ; The order *MATTERS* for some attributes
'(vc-state subtree-state nerd-icons collapse git-msg file-time file-size)
dirvish-side-attributes
'(vc-state nerd-icons collapse file-size))
;; open large directory (over 20000 files) asynchronously with `fd' command
(setq dirvish-large-directory-threshold 20000))
(setq dirvish-large-directory-threshold 20000)
(delete '(no-other-window . t) dirvish-side-window-parameters))
(use-package doc-view
:defer t