1

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?
Drew
  • 75,699
  • 9
  • 109
  • 225
Garid
  • 545
  • 1
  • 13

1 Answers1

1

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)
Garid
  • 545
  • 1
  • 13