aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-lisp/packages/rul-fm.el
diff options
context:
space:
mode:
authorRaúl Benencia <id@rbenencia.name>2024-10-27 14:49:45 -0700
committerRaúl Benencia <id@rbenencia.name>2024-10-27 16:27:26 -0700
commit700e602eab115b12ff9b0bd2d7f7732b50b92156 (patch)
tree2cb7142836f6077f2423146ebf6a7343916fb049 /.emacs.d/rul-lisp/packages/rul-fm.el
parent4bb4766f0387d2af478b9d06849bd3ee900787a7 (diff)
emacs: move dired config from init.el to rul-fm.el
Diffstat (limited to '.emacs.d/rul-lisp/packages/rul-fm.el')
-rw-r--r--.emacs.d/rul-lisp/packages/rul-fm.el34
1 files changed, 34 insertions, 0 deletions
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)
nihil fit ex nihilo