diff options
author | Raúl Benencia <id@rbenencia.name> | 2024-10-27 14:49:45 -0700 |
---|---|---|
committer | Raúl Benencia <id@rbenencia.name> | 2024-10-27 16:27:26 -0700 |
commit | 700e602eab115b12ff9b0bd2d7f7732b50b92156 (patch) | |
tree | 2cb7142836f6077f2423146ebf6a7343916fb049 | |
parent | 4bb4766f0387d2af478b9d06849bd3ee900787a7 (diff) |
emacs: move dired config from init.el to rul-fm.el
-rw-r--r-- | .emacs.d/init.el | 35 | ||||
-rw-r--r-- | .emacs.d/rul-lisp/packages/rul-fm.el | 34 |
2 files changed, 36 insertions, 33 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 6b4e0de..2fc32fb 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -140,38 +140,7 @@ ;; (desktop-save-mode 1) ;; It's easier to get to magit if symlinks are followed. -(setq vc-follow-symlinks t) - -;; dired -(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)) - -(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) - -;;; Icons -(use-package nerd-icons :ensure t ) -(use-package nerd-icons-dired :ensure t - :config - (add-hook 'dired-mode-hook #'nerd-icons-dired-mode) - ) +(setq vc-follow-symlinks t) ;; drop (dolist (path '("~/.emacs.d/rul-lisp/config" "~/.emacs.d/rul-lisp/packages")) (add-to-list 'load-path path)) @@ -179,6 +148,7 @@ (pixel-scroll-precision-mode 1) (require 'rul-completion) +(require 'rul-fm) (require 'rul-prog) (require 'rul-elfeed) (require 'rul-modeline) @@ -211,4 +181,3 @@ (load-file file)) ;; init.el ends here -(put 'dired-find-alternate-file 'disabled nil) 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) |