From 46f79f42cb2b7b38143ee6aa60b28aab78f0f366 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 20 Jan 2022 20:27:47 +0000 Subject: jao-spt: lyrics --- exwm.org | 3 ++- lib/media/jao-spt.el | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/exwm.org b/exwm.org index 61588c0..ce2f3d9 100644 --- a/exwm.org +++ b/exwm.org @@ -545,7 +545,8 @@ ("p" "previous" jao-spt-previous)] ["current song" ("l" "like" jao-spt-like) - ("d" "dislike" jao-spt-dislike)] + ("d" "dislike" jao-spt-dislike) + ("L" "lyrics" jao-spt-show-lyrics)] ["seek" ("f" "forward 10 secs" jao-spt-seek :transient t) ("b" "backward 10 secs" jao-spt-seek-back :transient t)] diff --git a/lib/media/jao-spt.el b/lib/media/jao-spt.el index c4c1604..1fdee83 100644 --- a/lib/media/jao-spt.el +++ b/lib/media/jao-spt.el @@ -110,5 +110,18 @@ (defun jao-spt-set-up () (jao-minibuffer-add-msg-variable 'jao-spt--status-str)) +(defun jao-spt-lyrics-info () + (let* ((jao-spt-format "%a~~~%t") + (s (jao-spt--pb)) + (at (split-string s "~~~"))) + (cons (car at) (cadr at)))) + +(declare jao-show-lyrics "jao-lyrics") + +;;;###autoload +(defun jao-spt-show-lyrics (force) + (interactive "P") + (jao-show-lyrics force #'jao-spt-lyrics-info)) + (provide 'jao-spt) ;;; jao-spt.el ends here -- cgit v1.2.3