summary refs log tree commit diff stats
path: root/lisp/+tab-bar.el
diff options
context:
space:
mode:
authorCase Duckworth2022-02-07 13:16:00 -0600
committerCase Duckworth2022-02-07 13:16:00 -0600
commit88e218faf2d52a21001eea8491aecd12c54b074a (patch)
treeb0a519c291ee56f43520ff6ff53c8b76a679925a /lisp/+tab-bar.el
parentAdd notmuch (diff)
downloademacs-88e218faf2d52a21001eea8491aecd12c54b074a.tar.gz
emacs-88e218faf2d52a21001eea8491aecd12c54b074a.zip
Add bongo
Diffstat (limited to 'lisp/+tab-bar.el')
-rw-r--r--lisp/+tab-bar.el31
1 files changed, 31 insertions, 0 deletions
diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index 83870e9..6567f67 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el
@@ -48,6 +48,37 @@
48 ignore 48 ignore
49 :help (discord-date-string))))) 49 :help (discord-date-string)))))
50 50
51(defcustom +tab-bar-emms-max-length 24
52 "Maximum length of `+tab-bar-emms'."
53 :type 'number)
54
55(defun +tab-bar-emms ()
56 "Display EMMS now playing information."
57 (when (and emms-mode-line-mode
58 emms-player-playing-p)
59 (let ((now-playing (+string-truncate (emms-mode-line-playlist-current)
60 (- +tab-bar-emms-max-length 2))))
61 `((emms-now-playing menu-item
62 ,(concat "{" now-playing "}" " ")
63 emms-pause
64 :help ,(emms-mode-line-playlist-current))))))
65
66(defun +tab-bar-bongo ()
67 "Display Bongo now playing information."
68 (when (and bongo-mode-line-indicator-mode
69 (bongo-playing-p))
70 `((bongo-now-playing menu-item
71 ,(concat "{"
72 (let ((bongo-field-separator ""))
73 (+string-truncate (replace-regexp-in-string
74 "\\(.*\\)\\(.*\\)\\(.*\\)"
75 "\\1: \\3"
76 (bongo-formatted-infoset))
77 (- +tab-bar-emms-max-length 2)))
78 "}")
79 bongo-pause/resume
80 :help ,(funcall bongo-header-line-function)))))
81
51(defvar +tab-bar-show-original nil 82(defvar +tab-bar-show-original nil
52 "Original value of `tab-bar-show'.") 83 "Original value of `tab-bar-show'.")
53 84