From 801ee6ec245a8a2fffdd81f256eab750634306fc Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 7 Feb 2022 17:09:32 -0600 Subject: Add +bongo-radio --- lisp/+tab-bar.el | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'lisp/+tab-bar.el') diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index 6567f67..c5a93dc 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el @@ -65,8 +65,14 @@ (defun +tab-bar-bongo () "Display Bongo now playing information." - (when (and bongo-mode-line-indicator-mode - (bongo-playing-p)) + (when-let ((modep bongo-mode-line-indicator-mode) + (buf (cl-some (lambda (b) + (with-current-buffer b + (when-let* ((modep (derived-mode-p 'bongo-playlist-mode)) + (bongo-playlist-buffer b) + (playingp (bongo-playing-p))) + b))) + (buffer-list)))) `((bongo-now-playing menu-item ,(concat "{" (let ((bongo-field-separator "")) @@ -76,7 +82,19 @@ (bongo-formatted-infoset)) (- +tab-bar-emms-max-length 2))) "}") - bongo-pause/resume + (lambda () (interactive) + (let ((bongo-playlist-buffer + ;; XXX: I'm sure this is terribly inefficient + (cl-some (lambda (b) + (with-current-buffer b + (when-let* ((modep (derived-mode-p + 'bongo-playlist-mode)) + (bongo-playlist-buffer b) + (playingp (bongo-playing-p))) + b))) + (buffer-list)))) + (with-bongo-playlist-buffer + (bongo-pause/resume)))) :help ,(funcall bongo-header-line-function))))) (defvar +tab-bar-show-original nil -- cgit 1.4.1-21-gabe81