Move all-the-icons to core-ui

This commit is contained in:
Henrik Lissner 2017-06-09 00:19:44 +02:00
parent c7254e7bdc
commit 58b77716c9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 17 additions and 26 deletions

View file

@ -1,4 +1,4 @@
;; core-ui.el -*- lexical-binding: t; -*- ;;; core-ui.el -*- lexical-binding: t; -*-
(defvar doom-ui-fringe-size '4 "Default fringe width") (defvar doom-ui-fringe-size '4 "Default fringe width")
@ -143,6 +143,22 @@ mode is detected.")
;; Plugins ;; Plugins
;; ;;
(def-package! all-the-icons
:commands (all-the-icons-octicon all-the-icons-faicon all-the-icons-fileicon
all-the-icons-wicon all-the-icons-allthe-icon
all-the-icons-install-fonts)
:init
(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-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))
(def-package! fringe-helper (def-package! fringe-helper
:commands fringe-helper-define) :commands fringe-helper-define)

View file

@ -45,15 +45,6 @@
(goto-char (previous-button (point)))))) (goto-char (previous-button (point))))))
(if (display-graphic-p)
(require 'all-the-icons)
(defalias 'all-the-icons-octicon #'ignore)
(defalias 'all-the-icons-faicon #'ignore)
(defalias 'all-the-icons-fileicon #'ignore)
(defalias 'all-the-icons-wicon #'ignore)
(defalias 'all-the-icons-alltheicon #'ignore))
;; ;;
(setq doom-fallback-buffer +doom-dashboard-name) (setq doom-fallback-buffer +doom-dashboard-name)

View file

@ -1,4 +0,0 @@
;; -*- no-byte-compile: t; -*-
;;; ui/doom-dashboard/packages.el
(package! all-the-icons)

View file

@ -4,17 +4,6 @@
(line-number-mode -1) (line-number-mode -1)
;; all-the-icons doesn't work in the terminal, so we "disable" it.
(unless (display-graphic-p)
(defalias 'all-the-icons-octicon #'ignore)
(defalias 'all-the-icons-faicon #'ignore)
(defalias 'all-the-icons-fileicon #'ignore)
(defalias 'all-the-icons-wicon #'ignore)
(defalias 'all-the-icons-alltheicon #'ignore))
(def-package! all-the-icons :demand t
:when (display-graphic-p))
(def-package! eldoc-eval :demand t (def-package! eldoc-eval :demand t
:config :config
;; Show eldoc in the mode-line with `eval-expression' ;; Show eldoc in the mode-line with `eval-expression'

View file

@ -13,7 +13,6 @@
;;(require 'iedit) ;;(require 'iedit)
;;(require 'evil-multiedit) ;;(require 'evil-multiedit)
(package! all-the-icons)
(package! eldoc-eval) (package! eldoc-eval)
(when (featurep! :feature evil) (when (featurep! :feature evil)
(package! evil-anzu)) (package! evil-anzu))