diff options
author | jao <jao@gnu.org> | 2021-06-04 18:40:25 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-06-04 18:40:25 +0100 |
commit | 3c26763dc6b20d01596fdf7ed9a608b126603ff8 (patch) | |
tree | c8a6ce74d42bf5b3453385c73c05ecc06bd735bb | |
parent | a025b165691001367d89ea60e254a1df76ac32f3 (diff) | |
download | elibs-3c26763dc6b20d01596fdf7ed9a608b126603ff8.tar.gz elibs-3c26763dc6b20d01596fdf7ed9a608b126603ff8.tar.bz2 |
mpc nits
-rw-r--r-- | init.org | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -2937,22 +2937,24 @@ (defvar jao-mopidy-port 6669) (jao-mpc-setup jao-mopidy-port) + (defun jao-mpc-pport () + (when (jao-mpc--playing-p jao-mopidy-port) jao-mopidy-port)) + (defmacro jao-defun-play (name &optional mpc-name) `(defun ,(intern (format "jao-player-%s" name)) () (interactive) - (,(intern (format "jao-mpc-%s" (or mpc-name name))) - (when (jao-mpc--playing-p jao-mopidy-port) - jao-mopidy-port)))) + (,(intern (format "jao-mpc-%s" (or mpc-name name))) (jao-mpc-pport)))) (jao-defun-play toggle) (jao-defun-play next) (jao-defun-play previous) (jao-defun-play stop) - (jao-defun-play seek) (jao-defun-play echo echo-current) (jao-defun-play list show-playlist) (jao-defun-play info lyrics-track-data) + (defun jao-player-seek (delta) (jao-mpc-seek delta (jao-mpc-pport))) + (defalias 'jao-player-browse 'jao-mpc-show-albums) (defalias 'jao-player-connect 'jao-mpc-connect) (defalias 'jao-player-play 'jao-mpc-play) @@ -3005,10 +3007,11 @@ (global-map "s-m" :color blue :quit-key "q") ("Play" (("m" jao-player-toggle "toggle") - ("s" (espotify-play-pause) "spotify") ("n" jao-player-next "next") ("p" jao-player-previous "previous") - ("f" (jao-player-seek 10) "seek fwd" :color red) + ("s" (espotify-play-pause) "toggle spotify")) + "Seek" + (("f" (jao-player-seek 10) "seek fwd" :color red) ("F" (jao-player-seek -10) "seek bwd" :color red)) "Browse" (("b" jao-player-browse "browse") |