diff options
author | jao <jao@gnu.org> | 2022-08-27 03:31:47 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-08-27 03:54:42 +0100 |
commit | 40ec9acb94ee96e0afafcddcfb2d4b35b4623ad7 (patch) | |
tree | 8283ac796ddee893b82dab5051a46497e63abd75 /init.el | |
parent | b820b18d7814c5291236d3aed26d34c6fc9c4d8d (diff) | |
download | elibs-40ec9acb94ee96e0afafcddcfb2d4b35b4623ad7.tar.gz elibs-40ec9acb94ee96e0afafcddcfb2d4b35b4623ad7.tar.bz2 |
mpc: auto-random fixed and nicer transient
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -3046,6 +3046,8 @@ (setq jao-mpc-last-port (unless jao-mpc-last-port jao-mopidy-port) jao-mpc-port jao-mpc-last-port)) +(defsubst jao-mpc-mopidy-p () (equal jao-mpc-last-port jao-mopidy-port)) + (jao-mpc-setup jao-mopidy-port (if jao-modeline-in-minibuffer -10 70)) (defun jao-mpc-pport (&optional mop) @@ -3142,7 +3144,12 @@ ("K" "dislike" jao-streaming-dislike)]]) (transient-define-prefix jao-transient-media () - [["Play" + [:description + (lambda () + (format "[%s %s]\n" + (if (jao-mpc-mopidy-p) "mopidy" "mpd") + (jao-mpc--current-timestr t))) + ["Play" ("m" "toggle" jao-player-toggle) ("n" "next" jao-player-next) ("p" "previous" jao-player-previous) @@ -3172,10 +3179,7 @@ ("r" (lambda () (concat (if jao-random-album-p "dis" "en") "able random album")) jao-random-album-toggle) - ("P" (lambda () - (concat "Toggle to " - (if (equal jao-mpc-last-port jao-mopidy-port) - "mpd" "mopidy"))) + ("P" (lambda () (concat "Toggle to " (if (jao-mpc-mopidy-p) "mpd" "mopidy"))) jao-mpc-toggle-port)]]) (global-set-key (kbd "s-m") #'jao-transient-media) |