Beautify github notifications.

This commit is contained in:
Vincent Zhang 2019-01-23 17:54:35 +08:00
parent d649c38d4a
commit 849ba7097f

View file

@ -1429,19 +1429,19 @@ Example:
(if (and doom-modeline-github (if (and doom-modeline-github
(doom-modeline--active) (doom-modeline--active)
(> doom-modeline--github-notifications-number 0)) (> doom-modeline--github-notifications-number 0))
(propertize (concat " "
(concat (if doom-modeline-icon " ") (if doom-modeline-icon
(doom-modeline-icon-faicon "github" (doom-modeline-icon-faicon "github"
:v-adjust -0.0575 :v-adjust -0.0575
:face 'doom-modeline-warning) :face 'doom-modeline-warning)
(if doom-modeline-icon doom-modeline-vspc " ") (propertize "#" 'face '(:inherit (doom-modeline-warning italic))))
doom-modeline-vspc
(propertize (number-to-string doom-modeline--github-notifications-number) (propertize (number-to-string doom-modeline--github-notifications-number)
'face 'doom-modeline-warning) 'face '(:inherit (warning italic))
" ") 'help-echo "Github Notifications
'help-echo "Github
mouse-1: Show notifications mouse-1: Show notifications
mouse-3: Fetch notifications" mouse-3: Fetch notifications"
'mouse-face '(:box 1) 'mouse-face 'mode-line-highlight
'local-map (let ((map (make-sparse-keymap))) 'local-map (let ((map (make-sparse-keymap)))
(define-key map [mode-line mouse-1] (define-key map [mode-line mouse-1]
#'doom-modeline--github-open-notifications) #'doom-modeline--github-open-notifications)
@ -1450,7 +1450,8 @@ mouse-3: Fetch notifications"
(interactive) (interactive)
(message "Fetching github notifications...") (message "Fetching github notifications...")
(doom-modeline--github-fetch-notifications))) (doom-modeline--github-fetch-notifications)))
map)))) map))
" ")))
;; ;;