From cf907059a46105afd38a8f3a7abb544a1e2362c0 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 28 Jun 2016 17:44:41 -0700 Subject: [PATCH] Add spaceline-gh-notifier segment --- dotfiles/emacs.d/README.org | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 7d66cc90..fae6f619 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2010,7 +2010,6 @@ This was stolen from https://github.com/jwiegley/dot-emacs **** github-notifier #+BEGIN_SRC emacs-lisp (use-package github-notifier - :disabled t :config (github-notifier-mode)) #+END_SRC **** github-browse-file @@ -3382,9 +3381,21 @@ Ensure all themes that I use are installed: "Display the number of minutes until the next muni train comes" (format "🚇%s" (imalison:get-cached-muni-time)) :when active) + + (advice-add 'github-notifier-mode :after + 'spaceline-gh-notifier-disable-default-notifier-modeline) + + (defun spaceline-gh-notifier-disable-default-notifier-modeline (&rest args) + (delq 'github-notifier-mode-line global-mode-string)) + + (spaceline-define-segment spaceline-gh-notifier + "Display the number of github notifications the user has" + (format "✉%s" github-notifier-unread-count) + :when (> github-notifier-unread-count 0)) + (setq powerline-height 25) (spaceline-helm-mode) - (spaceline-spacemacs-theme))) + (spaceline-spacemacs-theme spaceline-gh-notifier))) #+END_SRC ** window-number #+BEGIN_SRC emacs-lisp