summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-02-02 03:54:52 +0000
committerjao <jao@gnu.org>2022-02-02 03:54:52 +0000
commite80a2fef9627c95186ac2068cc58f082b6ca0729 (patch)
tree65f0c7d122d9f4edd65bd9ba00796e29a3939f4d /init.org
parent42cf90da66e9ff24939a98139016138905e1b201 (diff)
downloadelibs-e80a2fef9627c95186ac2068cc58f082b6ca0729.tar.gz
elibs-e80a2fef9627c95186ac2068cc58f082b6ca0729.tar.bz2
tweaks for interaction with deezer
Diffstat (limited to 'init.org')
-rw-r--r--init.org18
1 files changed, 16 insertions, 2 deletions
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")))