From 700e602eab115b12ff9b0bd2d7f7732b50b92156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Sun, 27 Oct 2024 14:49:45 -0700 Subject: emacs: move dired config from init.el to rul-fm.el --- .emacs.d/rul-lisp/packages/rul-fm.el | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .emacs.d/rul-lisp/packages/rul-fm.el (limited to '.emacs.d/rul-lisp/packages/rul-fm.el') diff --git a/.emacs.d/rul-lisp/packages/rul-fm.el b/.emacs.d/rul-lisp/packages/rul-fm.el new file mode 100644 index 0000000..9abaffe --- /dev/null +++ b/.emacs.d/rul-lisp/packages/rul-fm.el @@ -0,0 +1,34 @@ +;;; rul-fm.el --- File management + +;; dired +(add-hook 'dired-mode-hook #'dired-hide-details-mode) +(setq dired-guess-shell-alist-user + '(("\\.\\(png\\|jpe?g\\|tiff\\)" "feh" "xdg-open") + ("\\.\\(mp[34]\\|m4a\\|ogg\\|flac\\|webm\\|mkv\\)" "mpv" "xdg-open") + (".*" "xdg-open"))) + +(setq dired-kill-when-opening-new-dired-buffer t) +(put 'dired-find-alternate-file 'disabled nil) + +;; dired-preview +(use-package dired-preview + :ensure t + :config + + (setq dired-preview-delay 0.5) + (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\\)")) + + (dired-preview-global-mode 1)) + +;;; Icons +(use-package nerd-icons :ensure t ) +(use-package nerd-icons-dired :ensure t + :config + (add-hook 'dired-mode-hook #'nerd-icons-dired-mode)) + +(provide 'rul-fm) -- cgit v1.2.3