diff options
author | jao <jao@gnu.org> | 2022-02-02 03:54:52 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-02-02 03:54:52 +0000 |
commit | e80a2fef9627c95186ac2068cc58f082b6ca0729 (patch) | |
tree | 65f0c7d122d9f4edd65bd9ba00796e29a3939f4d /init.org | |
parent | 42cf90da66e9ff24939a98139016138905e1b201 (diff) | |
download | elibs-e80a2fef9627c95186ac2068cc58f082b6ca0729.tar.gz elibs-e80a2fef9627c95186ac2068cc58f082b6ca0729.tar.bz2 |
tweaks for interaction with deezer
Diffstat (limited to 'init.org')
-rw-r--r-- | init.org | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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"))) |