summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.org14
-rw-r--r--lib/media/jao-spt.el5
2 files changed, 14 insertions, 5 deletions
diff --git a/init.org b/init.org
index 79844f0..3994cb4 100644
--- a/init.org
+++ b/init.org
@@ -2956,6 +2956,7 @@
(defalias 'jao-spotify-volume-down #'jao-spt-vol-down)))
(defvar jao-spt-on t)
+ (defun jao-spt-on-p () jao-spt-on)
(jao-spt-setup-aliases)
(defun jao-spotify-toggle-player ()
@@ -3039,7 +3040,7 @@
(transient-define-prefix jao-transient-spotify ()
[:description
- (lambda () (format "Spotify using %s\n" (if jao-spt-on "spt" "MPRIS")))
+ (lambda () (format "Spotify using %s" (if jao-spt-on "spt" "MPRIS")))
["Search"
("a" "album" jao-spotify-album)
("A" "artist" jao-spotify-artist)
@@ -3049,17 +3050,20 @@
("s" "toggle" jao-spotify-toggle)
("n" "next" jao-spotify-next)
("p" "previous" jao-spotify-prev)]
- ["Seek"
+ ["Seek & shout"
("f" "seek fwd" jao-spotify-seek :transient t)
- ("F" "seek bwd" jao-spotify-seek-back :transient t)]
- ["Volume"
+ ("F" "seek bwd" jao-spotify-seek-back :transient t)
("u" "up" jao-spotify-volume :transient t)
("d" "down" jao-spotify-volume-down :transient t)]
["Browse"
("l" "playing list" jao-spotify-list)
("L" "lyrics" jao-spotify-lyrics)
("w" "currently playing" jao-spotify-current)
- ("t" "toggle player" jao-spotify-toggle-player)]])
+ ("t" "toggle player" jao-spotify-toggle-player)]
+ ["Act" :if jao-spt-on-p
+ ("k" "like" jao-spt-like)
+ ("K" "dislike" jao-spt-dislike)
+ ("S" "toggle shuffling" jao-spt-toggle-shuffle)]])
(transient-define-prefix jao-transient-media ()
[["Play"
diff --git a/lib/media/jao-spt.el b/lib/media/jao-spt.el
index 9cdd93e..4484ead 100644
--- a/lib/media/jao-spt.el
+++ b/lib/media/jao-spt.el
@@ -85,6 +85,11 @@
(jao-spt--pb* "--dislike"))
;;;###autoload
+(defun jao-spt-toggle-shuffle ()
+ (interactive)
+ (jao-spt--pb* "--shuffle"))
+
+;;;###autoload
(defun jao-spt-seek (&optional secs)
(interactive "p")
(let ((secs (if (zerop (or secs 0)) 10 secs)))