Change github to GitHub.

This commit is contained in:
Vincent Zhang 2019-08-18 03:56:39 +08:00
parent 572d19f194
commit b2bd730f1e
3 changed files with 12 additions and 12 deletions

View file

@ -31,7 +31,7 @@ The `doom-modeline` was designed for minimalism, and offers:
- An indicator for debug state
- An indicator for current input method
- An indicator for LSP state with `lsp-mode` or `eglot`
- An indicator for github notifications
- An indicator for GitHub notifications
- An indicator for unread emails with `mu4e-alert`
- An indicator for irc notifications with `circe`
- An indicator for buffer position which is compatible with `nyan-mode`
@ -208,10 +208,10 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
;; Whether display `lsp' state or not. Non-nil to display in mode-line.
(setq doom-modeline-lsp t)
;; Whether display github notifications or not. Requires `ghub` package.
;; Whether display GitHub notifications or not. Requires `ghub` package.
(setq doom-modeline-github nil)
;; The interval of checking github.
;; The interval of checking GitHub.
(setq doom-modeline-github-interval (* 30 60))
;; Whether display mu4e notifications or not. Requires `mu4e-alert' package.

View file

@ -252,12 +252,12 @@ If the actual char height is larger, it respects the actual char height."
:group 'doom-modeline)
(defcustom doom-modeline-github nil
"Whether display github notifications or not. Requires `ghub' package."
"Whether display GitHub notifications or not. Requires `ghub' package."
:type 'boolean
:group 'doom-modeline)
(defcustom doom-modeline-github-interval 1800 ; (* 30 60)
"The interval of checking github."
"The interval of checking GitHub."
:type 'integer
:group 'doom-modeline)

View file

@ -1748,11 +1748,11 @@ mouse-3: Reconnect to server" nick (eglot--major-mode server)))
(defvar doom-modeline--github-notifications-number 0)
(defvar doom-modeline-before-github-fetch-notification-hook nil
"Hooks before fetching github notifications.
"Hooks before fetching GitHub notifications.
Example:
(add-hook 'doom-modeline-before-github-fetch-notification-hook #'auth-source-pass-enable)")
(defun doom-modeline--github-fetch-notifications ()
"Fetch github notifications."
"Fetch GitHub notifications."
(when (and doom-modeline-github
(fboundp 'async-start))
;; load `async' if it exists but is not loaded
@ -1781,7 +1781,7 @@ Example:
(defvar doom-modeline--github-timer nil)
(defun doom-modeline-github-timer ()
"Start/Stop the timer for github fetching."
"Start/Stop the timer for GitHub fetching."
(if (timerp doom-modeline--github-timer)
(cancel-timer doom-modeline--github-timer))
(setq doom-modeline--github-timer
@ -1801,7 +1801,7 @@ Example:
(doom-modeline-github-timer)
(doom-modeline-def-segment github
"The github notifications."
"The GitHub notifications."
(if (and doom-modeline-github
(doom-modeline--active)
(> doom-modeline--github-notifications-number 0))
@ -1825,15 +1825,15 @@ mouse-3: Fetch notifications"
'local-map (let ((map (make-sparse-keymap)))
(define-key map [mode-line mouse-1]
(lambda ()
"Open github notifications page."
"Open GitHub notifications page."
(interactive)
(run-with-timer 300 nil #'doom-modeline--github-fetch-notifications)
(browse-url "https://github.com/notifications")))
(define-key map [mode-line mouse-3]
(lambda ()
"Fetching github notifications."
"Fetching GitHub notifications."
(interactive)
(message "Fetching github notifications...")
(message "Fetching GitHub notifications...")
(doom-modeline--github-fetch-notifications)))
map))
(doom-modeline-spc))))