Remove vuiet keybindings in favor of going all-in on hydra

This commit is contained in:
Jeremy Dormitzer 2020-04-04 06:18:03 -04:00
parent 63ee4bea74
commit bafebe5fb7

View File

@ -5783,14 +5783,6 @@ A music browser and player:
vuiet--playing-track-duration vuiet--playing-track-duration
vuiet--playing-track) vuiet--playing-track)
:defer t :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 :config
(defun vuiet-safe-update-mode-line () (defun vuiet-safe-update-mode-line ()
(interactive) (interactive)
@ -5807,25 +5799,7 @@ A music browser and player:
(run-at-time t 1 #'vuiet-safe-update-mode-line))) (run-at-time t 1 #'vuiet-safe-update-mode-line)))
(vuiet-reset-mode-line) (vuiet-reset-mode-line)
:general :general
(vuiet-player-map "p" #'vuiet-play-pause) ((normal motion visual) vuiet-mode-map "q" #'quit-window))
(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 "t" #'vuiet-play-track-search)
(vuiet-interactive-map "l" #'vuiet-play-loved-tracks)
(vuiet-interactive-map "L" #'vuiet-play-loved-tracks-similar))
#+END_SRC #+END_SRC
And a handy hydra for it: And a handy hydra for it:
@ -5857,8 +5831,9 @@ And a handy hydra for it:
(interactive) (interactive)
(hydra-show-hint hydra-vuiet/hint 'refresh-hydra-vuiet)) (hydra-show-hint hydra-vuiet/hint 'refresh-hydra-vuiet))
(defhydra hydra-vuiet (:hint nil (defhydra hydra-vuiet (:hint nil
:color blue
:body-pre (setq hydra-vuiet-body-timer :body-pre (setq hydra-vuiet-body-timer
(run-at-time t 1 #'refresh-hydra-vuiet)) (run-at-time 1 1 #'refresh-hydra-vuiet))
:post (cancel-function-timers 'refresh-hydra-vuiet)) :post (cancel-function-timers 'refresh-hydra-vuiet))
" "
--- ^^ ^^ ^^ --- --- ^^ ^^ ^^ ---
@ -5871,18 +5846,96 @@ And a handy hydra for it:
| 'b######++#/-/##d' || ^^ |%s(track-pos)^^| ^^ || 'b######++#/-/##d' | | 'b######++#/-/##d' || ^^ |%s(track-pos)^^| ^^ || 'b######++#/-/##d' |
| '9############P' || ^^ +-------------^^+ ^^ || '9############P' | | '9############P' || ^^ +-------------^^+ ^^ || '9############P' |
| -'9a#######aP' || +---------^^+---------------^^--+---------^^--+ || -'9a#######aP' | | -'9a#######aP' || +---------^^+---------------^^--+---------^^--+ || -'9a#######aP' |
| |-| `'''''' || | _s_top | _p_lay/pause | _n_ext | || |-| `'''''' | | |-| `'''''' || | _s_top | _p_lay/pause | _n_ext | || |-| `'''''' | [_I_]nfo menu
| ---..----------- || +---------^^+---------------^^--+---------^^--+ || ---..----------- | | ---..----------- || +---------^^+---------------^^--+---------^^--+ || ---..----------- | [_S_]imilar menu
| |---||-----------| |+------------^^----------------^^------------^^-----+| |---||-----------| | | |---||-----------| |+------------^^----------------^^------------^^-----+| |---||-----------| |
| | ^^ ^^ ^^ | | [_q_]uit | | ^^ ^^ ^^ | | [_q_]uit
+--------------------+ ^^ ^^ ^^ +--------------------+ +--------------------+ ^^ ^^ ^^ +--------------------+
" "
("s" vuiet-stop :color blue) ("s" vuiet-stop)
("p" vuiet-play-pause) ("p" vuiet-play-pause :color red)
("n" vuiet-next) ("n" vuiet-next :color red)
("t" vuiet-play-tag-similar) ("t" vuiet-play-tag-similar)
("a" vuiet-play-artist) ("a" vuiet-play-artist)
("l" vuiet-play-album) ("l" vuiet-play-album)
("q" nil :color blue)) ("I" hydra-vuiet-info/body)
("S" hydra-vuiet-similar/body)
("q" nil))
(general-def "C-c v" #'hydra-vuiet/body) (general-def "C-c v" #'hydra-vuiet/body)
(defvar hydra-vuiet-info-body-timer)
(defun refresh-hydra-vuiet-info ()
(interactive)
(hydra-show-hint hydra-vuiet-info/hint 'refresh-hydra-vuiet-info))
(defhydra hydra-vuiet-info (:hint nil
:color blue
:body-pre (setq hydra-vuiet-info-body-timer
(run-at-time 1 1 #'refresh-hydra-vuiet-info))
:post (cancel-function-timers 'refresh-hydra-vuiet-info))
"
--- ^^ ^^ ^^ ---
+------------------/ / ^^ ^^ ^^ +------------------/ /
| - ------- / / ^^ ^^ ^^ | - ------- / /
|(-) .d########b. //)|+------------^^----------------^^------------^^-----+|(-) .d########b. //)| Info for [_t_]ag
| .d############// ||+-----------^^----------------^^------------^^----+|| .d############// | Info for [_a_]rtist
| .d######''####//b. |||%s(now-playing 43)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^||| .d######''####//b. | Info for a[_l_]bum
| 9######( )#-//##P ||+-----------^^--+-------------^^+-----------^^----+|| 9######( )#-//##P | Info for [_c_]urrent artist
| 'b######++#/-/##d' || ^^ |%s(track-pos)^^| ^^ || 'b######++#/-/##d' |
| '9############P' || ^^ +-------------^^+ ^^ || '9############P' | [_L_]oved tracks
| -'9a#######aP' || +---------^^+---------------^^--+---------^^--+ || -'9a#######aP' |
| |-| `'''''' || | _s_top | _p_lay/pause | _n_ext | || |-| `'''''' | [_P_]layer menu
| ---..----------- || +---------^^+---------------^^--+---------^^--+ || ---..----------- | [_S_]imilar menu
| |---||-----------| |+------------^^----------------^^------------^^-----+| |---||-----------| |
| | ^^ ^^ ^^ | | [_q_]uit
+--------------------+ ^^ ^^ ^^ +--------------------+
"
("s" vuiet-stop)
("p" vuiet-play-pause :color red)
("n" vuiet-next :color red)
("t" vuiet-tag-info)
("a" vuiet-artist-info-search)
("l" vuiet-album-info-search)
("c" vuiet-playing-artist-info)
("L" vuiet-loved-tracks-info)
("P" hydra-vuiet/body)
("S" hydra-vuiet-similar/body)
("q" nil))
(defvar hydra-vuiet-similar-body-timer)
(defun refresh-hydra-vuiet-similar ()
(interactive)
(hydra-show-hint hydra-vuiet-similar/hint 'refresh-hydra-vuiet-similar))
(defhydra hydra-vuiet-similar (:hint nil
:color blue
:body-pre (setq hydra-vuiet-similar-body-timer
(run-at-time 1 1 #'refresh-hydra-vuiet-similar))
:post (cancel-function-timers 'refresh-hydra-vuiet-similar))
"
--- ^^ ^^ ^^ ---
+------------------/ / ^^ ^^ ^^ +------------------/ /
| - ------- / / ^^ ^^ ^^ | - ------- / /
|(-) .d########b. //)|+------------^^----------------^^------------^^-----+|(-) .d########b. //)| Play [_t_]ag similar
| .d############// ||+-----------^^----------------^^------------^^----+|| .d############// | Play [_a_]rtist similar
| .d######''####//b. |||%s(now-playing 43)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^||| .d######''####//b. | Play [_l_]oved tracks similar
| 9######( )#-//##P ||+-----------^^--+-------------^^+-----------^^----+|| 9######( )#-//##P |
| 'b######++#/-/##d' || ^^ |%s(track-pos)^^| ^^ || 'b######++#/-/##d' | Play [_c_]urrent artist similar
| '9############P' || ^^ +-------------^^+ ^^ || '9############P' | Play current [_T_]ag similar
| -'9a#######aP' || +---------^^+---------------^^--+---------^^--+ || -'9a#######aP' |
| |-| `'''''' || | _s_top | _p_lay/pause | _n_ext | || |-| `'''''' | [_P_]layer menu
| ---..----------- || +---------^^+---------------^^--+---------^^--+ || ---..----------- | [_I_]nfo menu
| |---||-----------| |+------------^^----------------^^------------^^-----+| |---||-----------| |
| | ^^ ^^ ^^ | | [_q_]uit
+--------------------+ ^^ ^^ ^^ +--------------------+
"
("s" vuiet-stop)
("p" vuiet-play-pause :color red)
("n" vuiet-next :color red)
("t" vuiet-play-tag-similar)
("a" vuiet-play-artist-similar)
("l" vuiet-play-loved-tracks-similar)
("c" vuiet-play-playing-artist-similar)
("T" vuiet-play-playing-tag-similar)
("P" hydra-vuiet/body)
("I" hydra-vuiet-info/body)
("q" nil))
#+END_SRC #+END_SRC