summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-07-22 20:05:40 +0100
committerjao <jao@gnu.org>2024-07-22 20:05:40 +0100
commitb1b4212cd6e1e2f1d0b0f34157ceb392cbb9e956 (patch)
treed722d3453fa7e82413582cb7c7284abfac8e0972
parent06942e500d499f9d4b933d1927fbbb2e5050b588 (diff)
downloadelibs-b1b4212cd6e1e2f1d0b0f34157ceb392cbb9e956.tar.gz
elibs-b1b4212cd6e1e2f1d0b0f34157ceb392cbb9e956.tar.bz2
media: mpris transient, ready-player
-rw-r--r--init.el20
1 files changed, 12 insertions, 8 deletions
diff --git a/init.el b/init.el
index b4ac420..c49a27c 100644
--- a/init.el
+++ b/init.el
@@ -2703,6 +2703,9 @@
(with-eval-after-load "consult"
(jao-consult-add-buffer-source 'jao-chat-buffer-source))
;;; Multimedia
+;;;; video
+(use-package ready-player :ensure t)
+(ready-player-mode 1)
;;;; mixer
(defun jao-mixer-get-level (&optional dev nomsg)
(interactive)
@@ -2766,6 +2769,8 @@
(interactive "P")
(jao-show-lyrics force #'jao-mpris-artist-title))
+(defun jao-mpris-mopidy-p () (string= "mopidy "jao-mpris-player))
+
(defun jao-mpc-mopidy-playlist ()
(interactive)
(jao-mpc-show-playlist jao-mopidy-port))
@@ -2786,8 +2791,7 @@
(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 70)
;; (jao-mpris-register "mopidy" :session 70)
;;;; mpc
@@ -2916,7 +2920,7 @@
(transient-define-prefix jao-transient-streaming ()
[:description
(lambda () (format "Streaming using %s" jao-mpris-player))
- ["Search"
+ ["Search" :if jao-mpris-mopidy-p
("a" "album" jao-streaming-album)
("A" "artist" jao-streaming-artist)
("t" "track" jao-streaming-track)
@@ -2924,21 +2928,21 @@
["Play"
("s" "toggle" jao-streaming-toggle)
("n" "next" jao-streaming-next)
- ("p" "previous" jao-streaming-prev)]
+ ("p" "previous" jao-streaming-prev)
+ ("T" "toggle player" jao-streaming-toggle-player)]
["Seek & shout"
("f" "seek fwd" jao-streaming-seek :transient t)
("F" "seek bwd" jao-streaming-seek-back :transient t)
("u" "up" jao-streaming-volume :transient t)
("d" "down" jao-streaming-volume-down :transient t)]
["Browse"
- ("l" "playing list" jao-streaming-list)
+ ("l" "playing list" jao-streaming-list :if jao-mpris-mopidy-p)
("L" "lyrics" jao-streaming-lyrics)
("w" "currently playing" jao-streaming-current)]
- ["Act"
+ ["Act" :if jao-mpris-mopidy-p
("k" "like" jao-streaming-like)
("K" "dislike" jao-streaming-dislike)
- ("S" "toggle shuffle" jao-streaming-toggle-shuffle)
- ("T" "toggle player" jao-streaming-toggle-player)]])
+ ("S" "toggle shuffle" jao-streaming-toggle-shuffle)]])
(transient-define-prefix jao-transient-media ()
[["Play"