From e80a2fef9627c95186ac2068cc58f082b6ca0729 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 2 Feb 2022 03:54:52 +0000 Subject: tweaks for interaction with deezer --- init.org | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'init.org') diff --git a/init.org b/init.org index 6d77719..97bb54c 100644 --- a/init.org +++ b/init.org @@ -2911,12 +2911,19 @@ #+end_src *** mpris #+begin_src emacs-lisp + (defun jao-mpris-lyrics (&optional force) + (interactive "P") + (jao-show-lyrics force #'jao-mpris-artist-title)) + (use-package jao-mpris :demand t :config (defun jao-mpris-setup-aliases () (setq espotify-play-uri-function #'espotify-play-uri-with-dbus) - (defalias 'jao-streaming-lyrics 'jao-show-lyrics) + (if (functionp 'jao-exwm-deezer) + (defalias 'jao-streaming-list #'jao-exwm-deezer) + (defalias 'jao-streaming-list #'ignore)) + (defalias 'jao-streaming-lyrics #'jao-mpris-lyrics) (defalias 'jao-streaming-toggle #'jao-mpris-play-pause) (defalias 'jao-streaming-next #'jao-mpris-next) (defalias 'jao-streaming-prev #'jao-mpris-previous) @@ -2978,7 +2985,14 @@ (defun jao-streaming-toggle-player () (interactive) - (if jao-spt-on (jao-mpris-setup-aliases) (jao-spt-setup-aliases)) + (if jao-spt-on + (let ((player (completing-read "Player: " + '( "chromium" "mopidy" "firefox" + "spotify") + nil nil nil nil jao-mpris-player))) + (setq jao-mpris-player player) + (jao-mpris-setup-aliases)) + (jao-spt-setup-aliases)) (message "%s activated " (if (setq jao-spt-on (not jao-spt-on)) "spt" "mpris"))) -- cgit v1.2.3