diff options
author | Raul Benencia <raul@thousandeyes.com> | 2024-02-12 10:48:05 -0300 |
---|---|---|
committer | Raul Benencia <raul@thousandeyes.com> | 2024-02-12 10:48:05 -0300 |
commit | 37bfe8f87103637a7ac248e667b3a051c4fe7aab (patch) | |
tree | 3ad67da44532dc0b2980b9e5e7d89aa63efe202f /.emacs.d/init.el | |
parent | f64a27bd4860140e3dedeb1c0cee6c4940315095 (diff) |
emacs: +dired-preview
Diffstat (limited to '.emacs.d/init.el')
-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) |