0

I use dired with (all-the-icons-dired which uses all-the-icons).

Current State: .m file presented with apple logo. enter image description here

Goal: Change (override) icon of .m file to same as icon of .matlab file extension.

What I've tried So far: from all-the-icons-dired's README:

Each file face is already predefined by all-the-icons

So I try to add matlab logo with .m file in the all-the-icons-data/file-icon-alist variable. with

(use-package all-the-icons
    :config
    (add-to-list 'all-the-icons-data/file-icon-alist '("m" . ""))   ;;  is the matlab icon
  )
(use-package all-the-icons-dired)
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)

However, There is still no change.

  • Do you know what I'm doing wrong here?
  • Should change another different variable?

1 Answer 1

0

Apparently all-the-icons-data/file-icon-alist was the just a pool of icons that all-the-icons-extension-icon-alist variables takes values. So I changed from ("m" ... "apple") to ("m" ... "matlab") in all-the-icons-extension-icon-alist as like below:

(use-package all-the-icons
  :config
  (add-to-list 'all-the-icons-extension-icon-alist '("m"  all-the-icons-fileicon "matlab"  :face all-the-icons-orange))
  )
(use-package all-the-icons-dired)
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.