add dirvish config
This commit is contained in:
@@ -107,7 +107,20 @@
|
|||||||
:defer t
|
:defer t
|
||||||
:config
|
:config
|
||||||
;; tramp-cache.el
|
;; 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)
|
(if (fboundp 'save-place-mode)
|
||||||
(save-place-mode)
|
(save-place-mode)
|
||||||
|
|||||||
@@ -360,8 +360,7 @@ see `awesome-tray-mode-hook'"
|
|||||||
;; automatically when opening a file
|
;; automatically when opening a file
|
||||||
;; (put 'dired-find-alternate-file 'disabled nil)
|
;; (put 'dired-find-alternate-file 'disabled nil)
|
||||||
(setq dired-mouse-drag-files t)
|
(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
|
(use-package dirvish
|
||||||
:defer t
|
:defer t
|
||||||
@@ -392,7 +391,9 @@ see `awesome-tray-mode-hook'"
|
|||||||
("<mouse-2>" . dired-mouse-find-file-other-window)
|
("<mouse-2>" . dired-mouse-find-file-other-window)
|
||||||
("<mouse-3>" . dired-mouse-find-file))
|
("<mouse-3>" . dired-mouse-find-file))
|
||||||
:config
|
: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
|
(setq dirvish-quick-access-entries
|
||||||
'(("h" "~/" "Home")
|
'(("h" "~/" "Home")
|
||||||
("d" "~/Downloads/" "Downloads")
|
("d" "~/Downloads/" "Downloads")
|
||||||
@@ -402,15 +403,16 @@ see `awesome-tray-mode-hook'"
|
|||||||
;; ("t" "~/.local/share/Trash/files/" "TrashCan")
|
;; ("t" "~/.local/share/Trash/files/" "TrashCan")
|
||||||
))
|
))
|
||||||
;; (dirvish-peek-mode) ; Preview files in minibuffer
|
;; (dirvish-peek-mode) ; Preview files in minibuffer
|
||||||
(dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
|
(dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
|
||||||
(setq dirvish-mode-line-format
|
;; (setq dirvish-mode-line-format
|
||||||
'(:left (sort symlink) :right (omit yank index)))
|
;; '(:left (sort symlink) :right (omit yank index)))
|
||||||
(setq dirvish-attributes ; The order *MATTERS* for some attributes
|
(setq dirvish-attributes ; The order *MATTERS* for some attributes
|
||||||
'(vc-state subtree-state nerd-icons collapse git-msg file-time file-size)
|
'(vc-state subtree-state nerd-icons collapse git-msg file-time file-size)
|
||||||
dirvish-side-attributes
|
dirvish-side-attributes
|
||||||
'(vc-state nerd-icons collapse file-size))
|
'(vc-state nerd-icons collapse file-size))
|
||||||
;; open large directory (over 20000 files) asynchronously with `fd' command
|
;; 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
|
(use-package doc-view
|
||||||
:defer t
|
:defer t
|
||||||
|
|||||||
Reference in New Issue
Block a user