nerd-icons-dired is inspired by all-the-icons-dired
Add nerd-icons-dired
to the load-path
:
(require 'nerd-icons)
...
(require 'nerd-icons-dired)
(add-hook 'dired-mode-hook #'nerd-icons-dired-mode)
or using use-package
:
(use-package nerd-icons-dired
:hook
(dired-mode . nerd-icons-dired-mode))
nerd-icons-dired
uses the default nerd-icons-icon-for-file
and nerd-icons-icon-for-dir
for icons. If you want to adjust the icons, simply define your own functions with the same function signatures. For example:
(use-package nerd-icons-dired
:preface
(defun my/nerd-icons-icon-for-file (file)
(nerd-icons-icon-for-file file :height 0.9 :v-adjust 0.45))
(defun my/nerd-icons-icon-for-dir (dir)
(nerd-icons-icon-for-dir dir :height 0.9 :v-adjust 0.45))
:custom
(nerd-icons-dired-file-icon-function #'my/nerd-icons-icon-for-file)
(nerd-icons-dired-dir-icon-function #'my/nerd-icons-icon-for-dir))