From 8366cad0e37d1d50528068aab21b61b4cb0791ed Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 31 Mar 2020 22:39:27 -0400 Subject: [PATCH] Add vuiet --- emacs/init.org | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/emacs/init.org b/emacs/init.org index d82a1be..276f5a5 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -5758,3 +5758,50 @@ A much-improved help buffer: :general (help-map "k" #'helpful-key)) #+END_SRC + +* Vuiet +A music browser and player: +#+BEGIN_SRC emacs-lisp + (use-package versuri + :straight (versuri :host github :repo "mihaiolteanu/versuri") + :defer t) + + (use-package vuiet + :straight (vuiet :host github :repo "mihaiolteanu/vuiet") + :defer t + :init + (defvar vuiet-interactive-map (make-sparse-keymap)) + (defvar vuiet-player-map (make-sparse-keymap)) + (defvar vuiet-browser-map (make-sparse-keymap)) + (leader-def-key "av" vuiet-interactive-map) + (jdormit/define-prefix "av" "vuiet") + (jdormit/define-prefix "avp" "player") + (jdormit/define-prefix "avb" "browser") + :config + (advice-add 'vuiet-update-mode-line :around + (lambda (oldfn &rest args) + (when (vuiet--playing-track) + (apply oldfn args)))) + (run-at-time t 1 #'vuiet-update-mode-line) + :general + (vuiet-player-map "p" #'vuiet-play-pause) + (vuiet-player-map "s" #'vuiet-stop) + (vuiet-player-map "n" #'vuiet-next) + (vuiet-player-map "r" #'vuiet-replay) + (vuiet-player-map "l" #'vuiet-love-track) + (vuiet-player-map "L" #'vuiet-unlove-track) + (vuiet-player-map "f" #'vuiet-seek-forward) + (vuiet-player-map "b" #'vuiet-seek-backward) + (vuiet-browser-map "a" #'vuiet-artist-info-search) + (vuiet-browser-map "A" #'vuiet-artist-info) + (vuiet-browser-map "l" #'vuiet-album-info-search) + (vuiet-browser-map "L" #'vuiet-album-info) + (vuiet-interactive-map "p" vuiet-player-map) + (vuiet-interactive-map "b" vuiet-browser-map) + (vuiet-interactive-map "a" #'vuiet-play-artist) + (vuiet-interactive-map "A" #'vuiet-play-artist-similar) + (vuiet-interactive-map "B" #'vuiet-pick-album) + (vuiet-interactive-map "t" #'vuiet-play-track-search) + (vuiet-interactive-map "l" #'vuiet-play-loved-tracks) + (vuiet-interactive-map "L" #'vuiet-play-loved-tracks-similar)) +#+END_SRC