diff options
Diffstat (limited to 'init.org')
-rw-r--r-- | init.org | 33 |
1 files changed, 19 insertions, 14 deletions
@@ -2944,20 +2944,25 @@ (defvar jao-mopidy-port 6669) (jao-mpc-setup 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)))) + + (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) + + (defalias 'jao-player-browse 'jao-mpc-show-albums) (defalias 'jao-player-connect 'jao-mpc-connect) - (defalias 'jao-player-toggle 'jao-mpc-toggle) - (defalias 'jao-player-next 'jao-mpc-next) - (defalias 'jao-player-previous 'jao-mpc-previous) - (defalias 'jao-player-stop 'jao-mpc-stop) - (defalias 'jao-player-seek 'jao-mpc-seek) (defalias 'jao-player-play 'jao-mpc-play) - (defalias 'jao-player-echo 'jao-mpc-echo-current) - (defalias 'jao-player-list 'jao-mpc-show-playlist) - (defalias 'jao-player-browse 'jao-mpc-show-albums) - - (defun jao-player-info () - (jao-mpc-lyrics-track-data - (when (jao-mpc--playing-p jao-mopidy-port) jao-mopidy-port))) #+end_src *** hydras #+begin_src emacs-lisp @@ -3007,6 +3012,7 @@ (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) @@ -3015,8 +3021,7 @@ (("b" jao-player-browse "browse") ("l" jao-player-list "show play list") ("L" jao-show-lyrics "show lyrics") - ("w" jao-player-echo "now playing (text)") - ("s" jao-player-search "search")) + ("w" jao-player-echo "now playing (text)")) "Master volume" (("d" jao-mixer-master-down "master down" :color red) ("u" jao-mixer-master-up "master up" :color red) |