diff options
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"))) |