Refactor all-the-icons disabler advice

This commit is contained in:
Henrik Lissner 2017-12-29 01:46:20 -05:00
parent 5c54f58ff8
commit a56b2afa46
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -247,14 +247,11 @@ instead)."
(defun doom*disable-all-the-icons-in-tty (orig-fn &rest args)
(when (display-graphic-p)
(apply orig-fn args)))
;; all-the-icons doesn't work in the terminal, so we "disable" it.
(advice-add #'all-the-icons-octicon :around #'doom*disable-all-the-icons-in-tty)
(advice-add #'all-the-icons-material :around #'doom*disable-all-the-icons-in-tty)
(advice-add #'all-the-icons-faicon :around #'doom*disable-all-the-icons-in-tty)
(advice-add #'all-the-icons-fileicon :around #'doom*disable-all-the-icons-in-tty)
(advice-add #'all-the-icons-wicon :around #'doom*disable-all-the-icons-in-tty)
(advice-add #'all-the-icons-alltheicon :around #'doom*disable-all-the-icons-in-tty))
(dolist (fn '(all-the-icons-octicon all-the-icons-material
all-the-icons-faicon all-the-icons-fileicon
all-the-icons-wicon all-the-icons-alltheicon))
(advice-add fn :around #'doom*disable-all-the-icons-in-tty)))
(def-package! fringe-helper
:commands (fringe-helper-define fringe-helper-convert)