Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New segment for tracking-mode. #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ and notifications from it.
*** ERC
[[http://www.emacswiki.org/emacs/ERC][ERC]] is an IRC client built in to Emacs. Spaceline shows channels with new
messages if you have =erc-track= turned on.
*** Circe
[[https://github.com/jorgenschaefer/circe][Circe]] is another IRC client for Emacs; it also provides a generic API for
listing modified buffers called =tracking-mode=.

Spaceline shows channels with new messages if you have =tracking-mode= turned
on; use =C-c C-SPC= to cycle through modified tracked buffers.

*** Org
Spaceline shows the currently clocking [[http://orgmode.org/][org-mode]] task.
Expand Down
1 change: 1 addition & 0 deletions spaceline-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
(minor-modes :when active)
(mu4e-alert-segment :when active)
(erc-track :when active)
(tracking-mode :when active :separator "")
(version-control :when active)
(org-pomodoro :when active)
(org-clock :when active)
Expand Down
8 changes: 8 additions & 0 deletions spaceline-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ a function that returns a name to use.")
(declare-function window-numbering-get-number 'window-numbering)
(declare-function pyenv-mode-version 'pyenv-mode)
(declare-function pyenv-mode-full-path 'pyenv-mode)
(declare-function tracking-mode 'tracking)

(spaceline-define-segment projectile-root
"Show the current projectile root."
Expand Down Expand Up @@ -355,6 +356,13 @@ package."
(mapcar (lambda (b) (buffer-name (car b)))
erc-modified-channels-alist)))

(spaceline-define-segment tracking-mode
"Show names of tracked buffers with changes.

Requires that `tracking-mode' is enabled."
(when (bound-and-true-p tracking-mode)
tracking-mode-line-buffers))

(defun spaceline--fancy-battery-percentage ()
"Return the load percentage or an empty string."
(let ((p (cdr (assq ?p fancy-battery-last-status))))
Expand Down