From a62adc491595a9c65ccf3f9dac4f3a1aefc47def Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 2 Jun 2021 02:22:43 +0100 Subject: make do sans jao-mpris --- init.org | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'init.org') diff --git a/init.org b/init.org index a7f57f3..7004e26 100644 --- a/init.org +++ b/init.org @@ -2922,10 +2922,6 @@ (global-set-key (kbd "") #'jao-toggle-audio-applet) #+end_src -*** mpris - #+begin_src emacs-lisp - (use-package jao-mpris) - #+end_src *** spotify Access to spotify uses packages tangled from [[./lib/media/espotify.org][espotify.org]], which offers functionality tailored to the completion engines at hand: @@ -2958,18 +2954,16 @@ (defalias 'jao-player-echo 'jao-mpc-echo-current) (defalias 'jao-player-list 'jao-mpc-show-playlist) (defalias 'jao-player-browse 'jao-mpc-show-albums) + + (defun jao-player-info () + (jao-mpc-lyrics-track-data + (when (jao-mpc--playing-p jao-mopidy-port) jao-mopidy-port))) #+end_src *** hydras #+begin_src emacs-lisp - (require 'jao-lyrics) - (defun jao-show-some-lyrics (arg) - (interactive "P") - (if (string-blank-p (or jao-mpris-track-string "")) - (jao-show-lyrics arg 'jao-mpc-lyrics-track-data) - (jao-show-lyrics arg 'jao-mpris-artist-title))) - - (defalias 'jao-player-show-lyrics 'jao-show-some-lyrics) + (require 'jao-lyrics) + (setq jao-lyrics-info-function #'jao-player-info) (defun jao-player-volume-delta (raise) (jao-player-vol-delta (if raise 5 -5)) @@ -3020,7 +3014,7 @@ "Browse" (("b" jao-player-browse "browse") ("l" jao-player-list "show play list") - ("L" jao-player-show-lyrics "show lyrics") + ("L" jao-show-lyrics "show lyrics") ("w" jao-player-echo "now playing (text)") ("s" jao-player-search "search")) "Master volume" -- cgit v1.2.3