From 9ca40d04b1e23c1fa9235adc2f9aeea59be87833 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Thu, 24 Jan 2019 01:58:17 +0800 Subject: [PATCH] Improve git notifications segment. --- doom-modeline-segments.el | 43 ++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 2b33df5..279fcd3 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -1429,29 +1429,30 @@ Example: (if (and doom-modeline-github (doom-modeline--active) (> doom-modeline--github-notifications-number 0)) - (concat " " - (if doom-modeline-icon - (doom-modeline-icon-faicon "github" - :v-adjust -0.0575 - :face 'doom-modeline-warning) - (propertize "#" 'face '(:inherit (doom-modeline-warning italic)))) - doom-modeline-vspc - (propertize (number-to-string doom-modeline--github-notifications-number) - 'face '(:inherit (warning italic)) - 'help-echo "Github Notifications + (propertize + (concat " " + (if doom-modeline-icon + (doom-modeline-icon-faicon "github" + :v-adjust -0.0575 + :face 'doom-modeline-warning) + (propertize "#" 'face '(:inherit (doom-modeline-warning italic)))) + doom-modeline-vspc + (propertize (number-to-string doom-modeline--github-notifications-number) + 'face '(:inherit (warning italic))) + " ") + 'help-echo "Github Notifications mouse-1: Show notifications mouse-3: Fetch notifications" - 'mouse-face 'mode-line-highlight - 'local-map (let ((map (make-sparse-keymap))) - (define-key map [mode-line mouse-1] - #'doom-modeline--github-open-notifications) - (define-key map [mode-line mouse-3] - (lambda () - (interactive) - (message "Fetching github notifications...") - (doom-modeline--github-fetch-notifications))) - map)) - " "))) + 'mouse-face '(:box 1) + 'local-map (let ((map (make-sparse-keymap))) + (define-key map [mode-line mouse-1] + #'doom-modeline--github-open-notifications) + (define-key map [mode-line mouse-3] + (lambda () + (interactive) + (message "Fetching github notifications...") + (doom-modeline--github-fetch-notifications))) + map)))) ;;