diff options
author | jao <jao@gnu.org> | 2022-01-27 19:15:12 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-01-27 19:15:12 +0000 |
commit | 6f987a738fe23c269cb2045c8b1e01b946381e9e (patch) | |
tree | ffc4fa50143523e1bf79790250b933821aa33669 | |
parent | 0b8f339d25300909b77b15945b309f5931253120 (diff) | |
download | elibs-6f987a738fe23c269cb2045c8b1e01b946381e9e.tar.gz elibs-6f987a738fe23c269cb2045c8b1e01b946381e9e.tar.bz2 |
jao-spt: shuffle
-rw-r--r-- | init.org | 14 | ||||
-rw-r--r-- | lib/media/jao-spt.el | 5 |
2 files changed, 14 insertions, 5 deletions
@@ -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))) |