From 8209edf91546e888c6f2a7a136a6c2af39022623 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Fri, 3 May 2019 22:20:35 +0800 Subject: [PATCH] Optimize performance. --- doom-modeline-core.el | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/doom-modeline-core.el b/doom-modeline-core.el index ea9b40e..9a3c9c3 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -78,13 +78,38 @@ It returns a file name which can be used directly as argument of (doom-modeline--set-char-widths `((2 . ,fonts))))) -;; TODO: better performance? -(doom-moddeline--set-font-widths all-the-icons-data/alltheicons-alist) -;; (doom-moddeline--set-font-widths all-the-icons-data/file-icon-alist) -;; (doom-moddeline--set-font-widths all-the-icons-data/weather-icons-alist) -(doom-moddeline--set-font-widths all-the-icons-data/octicons-alist) -(doom-moddeline--set-font-widths all-the-icons-data/material-icons-alist) -(doom-moddeline--set-font-widths all-the-icons-data/fa-icon-alist) +(defconst doom-modeline-icons-alist + '(;; macro + ("fiber_manual_record" . "\xe061") + ("triangle-right" . "\xf05a") + + ;; multiple-cursors + ("i-cursor" . "\xf246") + + ;; LSP + ("rocket" . "\xf135") + + ;; github + ("github" . "\xf09b") + + ;; debug + ("bug" . "\xf188") + + ;; mu4e + ("email" . "\xe0be") + ;; ("mail" . "\xe158") + + ;; irc + ("message" . "\xe0c9") + + ;; Battery + ("battery-charging" . "\xe939") + ("battery-empty" . "\xf244") + ("battery-full" . "\xf240") + ("battery-half" . "\xf242") + ("battery-quarter" . "\xf243") + ("battery-three-quarters" . "\xf241"))) +(doom-moddeline--set-font-widths doom-modeline-icons-alist) ;;