|
|
|
@@ -49,103 +49,103 @@
|
|
|
|
|
(defun all-the-icons-icon-for-dir (dir &optional chevron padding)
|
|
|
|
|
"Format an icon for DIR with CHEVRON similar to tree based directories."
|
|
|
|
|
(let* ((matcher (all-the-icons-match-to-alist (file-name-base (directory-file-name dir)) all-the-icons-dir-icon-alist))
|
|
|
|
|
(path (expand-file-name dir))
|
|
|
|
|
(chevron (if chevron (all-the-icons-octicon (format "chevron-%s" chevron) :height 0.8 :v-adjust -0.1) ""))
|
|
|
|
|
(padding (or padding "\t"))
|
|
|
|
|
(icon (cond
|
|
|
|
|
((file-symlink-p path)
|
|
|
|
|
(all-the-icons-octicon "file-symlink-directory" :height 1.0 :v-adjust 0.0))
|
|
|
|
|
((all-the-icons-dir-is-submodule path)
|
|
|
|
|
(all-the-icons-octicon "file-submodule" :height 1.0 :v-adjust 0.0))
|
|
|
|
|
((file-exists-p (format "%s/.git" path))
|
|
|
|
|
(format "%s" (all-the-icons-octicon "repo" :height 1.1 :v-adjust 0.0)))
|
|
|
|
|
(t (apply (car matcher) (list (cadr matcher) :v-adjust 0.0))))))
|
|
|
|
|
(format "%s%s%s%s%s" padding chevron padding icon padding)))
|
|
|
|
|
(path (expand-file-name dir))
|
|
|
|
|
(chevron (if chevron (all-the-icons-octicon (format "chevron-%s" chevron) :height 0.8 :v-adjust -0.1) ""))
|
|
|
|
|
(padding (or padding "\t"))
|
|
|
|
|
(icon (cond
|
|
|
|
|
((file-symlink-p path)
|
|
|
|
|
(all-the-icons-octicon "file-symlink-directory" :height 1.0 :v-adjust 0.0))
|
|
|
|
|
((all-the-icons-dir-is-submodule path)
|
|
|
|
|
(all-the-icons-octicon "file-submodule" :height 1.0 :v-adjust 0.0))
|
|
|
|
|
((file-exists-p (format "%s/.git" path))
|
|
|
|
|
(format "%s" (all-the-icons-octicon "repo" :height 1.1 :v-adjust 0.0)))
|
|
|
|
|
(t (apply (car matcher) (list (cadr matcher) :v-adjust 0.0))))))
|
|
|
|
|
(format "%s%s%s%s%s" padding chevron padding icon padding)))
|
|
|
|
|
|
|
|
|
|
(defun all-the-icons-reset ()
|
|
|
|
|
"Reset (unmemoize/memoize) the icons."
|
|
|
|
|
(interactive)
|
|
|
|
|
(dolist (f '(all-the-icons-icon-for-file
|
|
|
|
|
all-the-icons-icon-for-mode
|
|
|
|
|
all-the-icons-icon-for-url
|
|
|
|
|
all-the-icons-icon-family-for-file
|
|
|
|
|
all-the-icons-icon-family-for-mode
|
|
|
|
|
all-the-icons-icon-family))
|
|
|
|
|
(ignore-errors
|
|
|
|
|
(memoize-restore f)
|
|
|
|
|
(memoize f)))
|
|
|
|
|
all-the-icons-icon-for-mode
|
|
|
|
|
all-the-icons-icon-for-url
|
|
|
|
|
all-the-icons-icon-family-for-file
|
|
|
|
|
all-the-icons-icon-family-for-mode
|
|
|
|
|
all-the-icons-icon-family))
|
|
|
|
|
(ignore-errors
|
|
|
|
|
(memoize-restore f)
|
|
|
|
|
(memoize f)))
|
|
|
|
|
(message "Reset all-the-icons")))
|
|
|
|
|
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(bongo-playlist-mode all-the-icons-material "playlist_play" :height 1.2 :v-adjust -0.2 :face 'all-the-icons-green))
|
|
|
|
|
'(bongo-playlist-mode all-the-icons-material "playlist_play" :height 1.2 :v-adjust -0.2 :face 'all-the-icons-green))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(bongo-library-mode all-the-icons-material "library_music" :height 1.1 :v-adjust -0.2 :face 'all-the-icons-dgreen))
|
|
|
|
|
'(bongo-library-mode all-the-icons-material "library_music" :height 1.1 :v-adjust -0.2 :face 'all-the-icons-dgreen))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(gnus-group-mode all-the-icons-fileicon "gnu" :face 'all-the-icons-silver))
|
|
|
|
|
'(gnus-group-mode all-the-icons-fileicon "gnu" :face 'all-the-icons-silver))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(gnus-summary-mode all-the-icons-octicon "inbox" :height 1.0 :v-adjust 0.0 :face 'all-the-icons-orange))
|
|
|
|
|
'(gnus-summary-mode all-the-icons-octicon "inbox" :height 1.0 :v-adjust 0.0 :face 'all-the-icons-orange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(gnus-article-mode all-the-icons-octicon "mail" :height 1.1 :v-adjust 0.0 :face 'all-the-icons-lblue))
|
|
|
|
|
'(gnus-article-mode all-the-icons-octicon "mail" :height 1.1 :v-adjust 0.0 :face 'all-the-icons-lblue))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(message-mode all-the-icons-octicon "mail" :height 1.1 :v-adjust 0.0 :face 'all-the-icons-lblue))
|
|
|
|
|
'(message-mode all-the-icons-octicon "mail" :height 1.1 :v-adjust 0.0 :face 'all-the-icons-lblue))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(diff-mode all-the-icons-octicon "git-compare" :v-adjust 0.0 :face all-the-icons-lred))
|
|
|
|
|
'(diff-mode all-the-icons-octicon "git-compare" :v-adjust 0.0 :face all-the-icons-lred))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(flycheck-error-list-mode all-the-icons-octicon "checklist" :height 1.1 :v-adjust 0.0 :face all-the-icons-lred))
|
|
|
|
|
'(flycheck-error-list-mode all-the-icons-octicon "checklist" :height 1.1 :v-adjust 0.0 :face all-the-icons-lred))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(elfeed-search-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
|
|
|
|
'(elfeed-search-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(elfeed-show-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-lorange))
|
|
|
|
|
'(elfeed-show-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-lorange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(newsticker-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
|
|
|
|
'(newsticker-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(newsticker-treeview-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
|
|
|
|
'(newsticker-treeview-mode all-the-icons-faicon "rss-square" :v-adjust -0.1 :face all-the-icons-orange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(newsticker-treeview-list-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-orange))
|
|
|
|
|
'(newsticker-treeview-list-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-orange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(newsticker-treeview-item-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-lorange))
|
|
|
|
|
'(newsticker-treeview-item-mode all-the-icons-octicon "rss" :height 1.1 :v-adjust 0.0 :face all-the-icons-lorange))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'("\\.[bB][iI][nN]$" all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
'("\\.[bB][iI][nN]$" all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'("\\.c?make$" all-the-icons-fileicon "gnu" :face all-the-icons-dorange))
|
|
|
|
|
'("\\.c?make$" all-the-icons-fileicon "gnu" :face all-the-icons-dorange))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'("\\.conf$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
'("\\.conf$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'("\\.toml$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
'("\\.toml$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(conf-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
'(conf-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(conf-space-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
'(conf-space-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(forge-topic-mode all-the-icons-alltheicon "git" :face all-the-icons-blue))
|
|
|
|
|
'(forge-topic-mode all-the-icons-alltheicon "git" :face all-the-icons-blue))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'("\\.xpm$" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-dgreen))
|
|
|
|
|
'("\\.xpm$" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-dgreen))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(help-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1 :face all-the-icons-purple))
|
|
|
|
|
'(help-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1 :face all-the-icons-purple))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(helpful-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1 :face all-the-icons-purple))
|
|
|
|
|
'(helpful-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1 :face all-the-icons-purple))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(Info-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1))
|
|
|
|
|
'(Info-mode all-the-icons-faicon "info-circle" :height 1.1 :v-adjust -0.1))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'("NEWS$" all-the-icons-faicon "newspaper-o" :height 0.9 :v-adjust -0.2))
|
|
|
|
|
'("NEWS$" all-the-icons-faicon "newspaper-o" :height 0.9 :v-adjust -0.2))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'("Cask\\'" all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-blue))
|
|
|
|
|
'("Cask\\'" all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-blue))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(cask-mode all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-blue))
|
|
|
|
|
'(cask-mode all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-blue))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'(".*\\.ipynb\\'" all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-orange))
|
|
|
|
|
'(".*\\.ipynb\\'" all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-orange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(ein:notebooklist-mode all-the-icons-faicon "book" :face all-the-icons-lorange))
|
|
|
|
|
'(ein:notebooklist-mode all-the-icons-faicon "book" :face all-the-icons-lorange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(ein:notebook-mode all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-orange))
|
|
|
|
|
'(ein:notebook-mode all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-orange))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(ein:notebook-multilang-mode all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-dorange))
|
|
|
|
|
'(ein:notebook-multilang-mode all-the-icons-fileicon "jupyter" :height 1.2 :face all-the-icons-dorange))
|
|
|
|
|
(add-to-list 'all-the-icons-icon-alist
|
|
|
|
|
'("\\.epub\\'" all-the-icons-faicon "book" :height 1.0 :v-adjust -0.1 :face all-the-icons-green))
|
|
|
|
|
'("\\.epub\\'" all-the-icons-faicon "book" :height 1.0 :v-adjust -0.1 :face all-the-icons-green))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(nov-mode all-the-icons-faicon "book" :height 1.0 :v-adjust -0.1 :face all-the-icons-green))
|
|
|
|
|
'(nov-mode all-the-icons-faicon "book" :height 1.0 :v-adjust -0.1 :face all-the-icons-green))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist
|
|
|
|
|
'(gfm-mode all-the-icons-octicon "markdown" :face all-the-icons-lblue)))
|
|
|
|
|
'(gfm-mode all-the-icons-octicon "markdown" :face all-the-icons-lblue)))
|
|
|
|
|
|
|
|
|
|
;; ATIDiredPac
|
|
|
|
|
(use-package all-the-icons-dired
|
|
|
|
@@ -159,7 +159,7 @@
|
|
|
|
|
;; Workaround for all-the-icons bug until PR merged https://github.com/domtronn/all-the-icons.el/pull/150
|
|
|
|
|
(when (require 'all-the-icons nil 'noerror)
|
|
|
|
|
(setq all-the-icons-mode-icon-alist
|
|
|
|
|
(delete '(erc-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0 :face all-the-icons-white) all-the-icons-mode-icon-alist))
|
|
|
|
|
(delete '(erc-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0 :face all-the-icons-white) all-the-icons-mode-icon-alist))
|
|
|
|
|
(add-to-list 'all-the-icons-mode-icon-alist '(erc-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0))))
|
|
|
|
|
;; -ATIDiredPac
|
|
|
|
|
|
|
|
|
|