diff options
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/init.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index f69233f..3347127 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -135,6 +135,28 @@ (setq vc-follow-symlinks nil) ;; dired +(use-package dired-preview + :ensure t + :config + + (setq dired-preview-delay 0.3) + (setq dired-preview-max-size (expt 2 20)) + (setq dired-preview-ignored-extensions-regexp + (concat "\\." + "\\(mkv\\|webm\\|mp4\\|mp3\\|ogg\\|m4a" + "\\|gz\\|zst\\|tar\\|xz\\|rar\\|zip" + "\\|iso\\|epub\\|pdf\\)")) + + (defun my-dired-preview-to-the-right () + "My preferred `dired-preview-display-action-alist-function'." + '((display-buffer-in-side-window) + (side . right) + (width . 0.3))) + + (setq dired-preview-display-action-alist-function #'my-dired-preview-to-the-right) + + (dired-preview-global-mode 1)) + (add-hook 'dired-mode-hook #'dired-hide-details-mode) (setq dired-guess-shell-alist-user @@ -189,3 +211,4 @@ (load-file file)) ;; init.el ends here +(put 'dired-find-alternate-file 'disabled nil) |