blob: 9abaffe99a15906d77dc8801ce2c617173855432 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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)
|