From 95bbe8733929d51055d47cbec2e6eababdd5b0f4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Oct 2016 17:27:47 +0200 Subject: [PATCH] Explicitly load all-the-icons; disable it in terminal; simple neotree in terminal --- core/core-modeline.el | 13 +++++++++++-- core/core-ui.el | 16 +++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/core/core-modeline.el b/core/core-modeline.el index a8c59e4b1..685a43d71 100644 --- a/core/core-modeline.el +++ b/core/core-modeline.el @@ -2,8 +2,6 @@ ;; This file tries to be an almost self-contained configuration of my mode-line. -(require 'powerline) - ;;; These are the invisible dependencies ;; Required ;;(require 'f) @@ -19,6 +17,17 @@ ;;(require 'iedit) ;;(require 'evil-multiedit) +(require 'powerline) +(require 'all-the-icons) + +;; all-the-icons doesn't work in the terminal, so we "disable" it. +(unless window-system + (defun all-the-icons-octicon (&rest _) "" "") + (defun all-the-icons-faicon (&rest _) "" "") + (defun all-the-icons-fileicon (&rest _) "" "") + (defun all-the-icons-wicon (&rest _) "" "") + (defun all-the-icons-alltheicon (&rest _) "" "")) + ;; ;; Variables diff --git a/core/core-ui.el b/core/core-ui.el index 2446c450b..5d977fd14 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -93,27 +93,17 @@ ;; Plugins ;; -(use-package all-the-icons - :commands (all-the-icons-icon-for-buffer - all-the-icons-icon-for-file - all-the-icons-icon-for-mode - all-the-icons-alltheicon - all-the-icons-faicon - all-the-icons-fileicon - all-the-icons-oction - all-the-icons-wicon)) - (use-package doom-themes :config (setq doom-neotree-enable-variable-pitch t + doom-neotree-file-icons 'simple doom-neotree-line-spacing 3) (load-theme doom-ui-theme t) ;; brighter source buffers (add-hook 'find-file-hook 'doom-buffer-mode) - ;; brighter minibuffer when active - (add-hook 'minibuffer-setup-hook 'doom-brighten-minibuffer) ;; Custom neotree theme - (require 'doom-neotree)) + (when window-system + (require 'doom-neotree))) (use-package beacon :config