diff --git a/README.md b/README.md index b8c7136..8c791f2 100644 --- a/README.md +++ b/README.md @@ -150,9 +150,6 @@ Strongly recommend to use ;; Please refer to https://github.com/bbatsov/projectile/issues/657. (setq doom-modeline-buffer-file-name-style 'truncate-upto-project) -;; If non-nil, the mode-line is displayed with the `variable-pitch' face. -(setq doom-modeline-enable-variable-pitch nil) - ;; Whether show `all-the-icons' or not (if nil nothing will be showed). (setq doom-modeline-icon t) diff --git a/doom-modeline-core.el b/doom-modeline-core.el index 0f3765b..612cab6 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -86,9 +86,6 @@ Given ~/Projects/FOSS/emacs/lisp/comint.el file-name => comint.el buffer-name => comint.el<2> (uniquify buffer name)") -(defvar doom-modeline-enable-variable-pitch nil - "If non-nil, the mode-line is displayed with the `variable-pitch' face.") - (defvar doom-modeline-icon (display-graphic-p) "Whether show `all-the-icons' or not. @@ -425,24 +422,6 @@ If DEFAULT is non-nil, set the default mode-line for all buffers." (add-hook 'focus-in-hook #'doom-modeline-focus) (add-hook 'focus-out-hook #'doom-modeline-unfocus)))) -;; Display mode-line with `variable-pitch' face -(defun doom-modeline-variable-pitch (&rest _) - (when doom-modeline-enable-variable-pitch - (dolist (face '(mode-line mode-line-inactive)) - (let ((faces (face-attribute face :inherit nil))) - (set-face-attribute - face nil :inherit - `(variable-pitch ,@(delq 'unspecified (if (listp faces) faces (list faces))))))) - - (with-eval-after-load 'doom-themes - (let ((faces (face-attribute 'doom-modeline-error :inherit nil))) - (set-face-attribute - 'doom-modeline-error nil :inherit - `(variable-pitch ,@(delq 'unspecified (if (listp faces) faces (list faces))))))))) - -(doom-modeline-variable-pitch) -(advice-add #'load-theme :after #'doom-modeline-variable-pitch) - ;; ;; Modeline helpers diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 86b1367..4d736aa 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -322,7 +322,9 @@ directory, the file name, and its state (modified, read-only or non-existent)." 'face `(:height ,(doom-modeline-icon-height 1.1) :family - ,(all-the-icons-icon-family icon)))) + ,(all-the-icons-icon-family icon) + :inherit + ,(if active 'mode-line 'mode-line-inactive)))) (if active doom-modeline-vspc doom-modeline-inactive-vspc)))) ;; state icon @@ -337,7 +339,8 @@ directory, the file name, and its state (modified, read-only or non-existent)." `(:height ,(doom-modeline-icon-height 1.3) :family - ,(all-the-icons-icon-family icon)) + ,(all-the-icons-icon-family icon) + :inherit mode-line-inactive) 'mode-line-inactive))) (if active doom-modeline-vspc doom-modeline-inactive-vspc))) @@ -543,7 +546,9 @@ Uses `all-the-icons-octicon' to fetch the icon." `(:height ,(doom-modeline-icon-height 1.2) :family - ,(all-the-icons-icon-family icon)) + ,(all-the-icons-icon-family icon) + :inherit + mode-line-inactive) 'mode-line-inactive)) doom-modeline-inactive-vspc (propertize text 'face 'mode-line-inactive))) @@ -856,7 +861,9 @@ icons." `(:height ,(doom-modeline-icon-height 1.3) :family - ,(all-the-icons-icon-family icon)) + ,(all-the-icons-icon-family icon) + :inherit + mode-line-inactive) 'mode-line-inactive))) (when (and doom-modeline-icon icon text) doom-modeline-inactive-vspc) (when text (propertize text 'face 'mode-line-inactive)))) @@ -1528,8 +1535,8 @@ mouse-3: Fetch notifications" (lambda () "Open github notifications page." (interactive) - (browse-url "https://github.com/notifications") - (run-with-timer 60 nil #'doom-modeline--github-fetch-notifications))) + (run-with-timer 60 nil #'doom-modeline--github-fetch-notifications) + (browse-url "https://github.com/notifications"))) (define-key map [mode-line mouse-3] (lambda () "Fetching github notifications." diff --git a/doom-modeline.el b/doom-modeline.el index 1240ff1..3631064 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -4,7 +4,7 @@ ;; Author: Vincent Zhang ;; Homepage: https://github.com/seagle0128/doom-modeline -;; Version: 1.8.1 +;; Version: 1.8.2 ;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (eldoc-eval "0.1") (dash "2.11.0")) ;; Keywords: faces mode-line