summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el18
1 files changed, 14 insertions, 4 deletions
diff --git a/init.el b/init.el
index 05aed48..9411777 100644
--- a/init.el
+++ b/init.el
@@ -2798,9 +2798,16 @@
(interactive "P")
(jao-show-lyrics force #'jao-mpris-artist-title))
+(defun jao-mpc-mopidy-playlist ()
+ (interactive)
+ (jao-mpc-show-playlist jao-mopidy-port))
+
(use-package jao-mpris :demand t)
(defun jao-mpris-setup-aliases ()
+ (setq espotify-play-uri-function #'espotify-play-uri-with-dbus)
+ (setq jao-mpris-player "mopidy")
+ (defalias 'jao-streaming-list #'jao-mpc-mopidy-playlist)
(defalias 'jao-streaming-lyrics #'jao-mpris-lyrics)
(defalias 'jao-streaming-toggle #'jao-mpris-play-pause)
(defalias 'jao-streaming-next #'jao-mpris-next)
@@ -2811,8 +2818,9 @@
(defalias 'jao-streaming-volume #'jao-mpris-vol)
(defalias 'jao-streaming-volume-down #'jao-mpris-vol-down))
-(jao-mpris-register "playerctld"
- :session (if jao-mode-line-in-minibuffer -10 70))
+;; (jao-mpris-register "playerctld"
+;; :session (if jao-mode-line-in-minibuffer -10 70))
+;; (jao-mpris-register "mopidy" :session 70)
;;;; mpc
(use-package jao-mpc
@@ -2895,9 +2903,10 @@
(defalias 'jao-streaming-dislike #'jao-spt-dislike)
(defalias 'jao-streaming-toggle-shuffle #'jao-spt-toggle-shuffle)))
-(defvar jao-spt-on nil)
(jao-def-exec-in-term "spt" "spt" (jao-afio-goto-scratch))
+(defvar jao-spt-on t)
+
(defun jao-streaming-toggle-player ()
(interactive)
(if jao-spt-on
@@ -2906,6 +2915,7 @@
(jao-mpris-setup-aliases))
(jao-spt-setup-aliases)
(setq jao-mpris-player "spt"))
+ (setq jao-spt-on (not jao-spt-on))
(message "%s activated " jao-mpris-player))
(jao-streaming-toggle-player)
@@ -2957,7 +2967,7 @@
("k" "like" jao-streaming-like)
("K" "dislike" jao-streaming-dislike)
("S" "toggle shuffle" jao-streaming-toggle-shuffle)
- ("t" "toggle player" jao-streaming-toggle-player)]])
+ ("T" "toggle player" jao-streaming-toggle-player)]])
(transient-define-prefix jao-transient-media ()
[["Play"