mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
irc: add new segment to display the unread status
This segment is meant for the main modeline and just displays a single, unread icon if there are any unread irc buffers.
This commit is contained in:
parent
b6b6691ea3
commit
c0cbf56db4
2 changed files with 18 additions and 1 deletions
|
@ -1559,6 +1559,23 @@ we don't want to remove that so we just return the original."
|
|||
;; add a space at the end to pad against the following segment
|
||||
(concat " " (doom-modeline--tracking-buffers tracking-buffers) " ")))
|
||||
|
||||
(doom-modeline-def-segment irc
|
||||
"A notification icon for any unread irc buffer."
|
||||
(when (and doom-modeline-irc
|
||||
(boundp 'tracking-mode-line-buffers)
|
||||
(> (length tracking-buffers) 0)
|
||||
(doom-modeline--active))
|
||||
(concat
|
||||
" "
|
||||
(propertize (doom-modeline-icon-material "sms"
|
||||
:height 0.9
|
||||
:face 'doom-modeline-warning)
|
||||
'help-echo (format "IRC Notifications: %s"
|
||||
(doom-modeline--tracking-buffers
|
||||
tracking-buffers))
|
||||
'display '(raise -0.17))
|
||||
" ")))
|
||||
|
||||
(provide 'doom-modeline-segments)
|
||||
|
||||
;;; doom-modeline-segments.el ends here
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
(doom-modeline-def-modeline 'main
|
||||
'(bar workspace-number window-number evil-state god-state ryo-modal xah-fly-keys matches buffer-info remote-host buffer-position parrot selection-info)
|
||||
'(misc-info persp-name lsp mu4e github debug minor-modes input-method buffer-encoding major-mode process vcs checker))
|
||||
'(misc-info persp-name lsp irc mu4e github debug minor-modes input-method buffer-encoding major-mode process vcs checker))
|
||||
|
||||
(doom-modeline-def-modeline 'minimal
|
||||
'(bar matches " " buffer-info)
|
||||
|
|
Loading…
Reference in a new issue