feat: simple music player
This commit is contained in:
commit
72a57489ea
22
README.md
Normal file
22
README.md
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
# `mp`
|
||||||
|
|
||||||
|
A very simple music player interface that uses `fzf` as an interface to
|
||||||
|
`mpc`.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- MPD + mpc
|
||||||
|
- fzf
|
||||||
|
|
||||||
|
## Bindings
|
||||||
|
|
||||||
|
|Shortcut|Description|
|
||||||
|
|---|---|
|
||||||
|
|ctrl-j|Move down a row|
|
||||||
|
|ctrl-k|Move up a row|
|
||||||
|
|ctrl-l|Move into selection (albums)|
|
||||||
|
|ctrl-h|Move up to top (artist)|
|
||||||
|
|ctrl-u|Update the mpd database|
|
||||||
|
|ctrl-space|Toggle play/pause|
|
||||||
|
|enter|Clear the queue and add the selection, and play it|
|
25
mp
Executable file
25
mp
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
#
|
||||||
|
## music player with fzf+mpc
|
||||||
|
#
|
||||||
|
function mp {
|
||||||
|
FZF_DEFAULT_COMMAND="mpc ls" \
|
||||||
|
fzf \
|
||||||
|
--bind 'ctrl-h:reload( \
|
||||||
|
eval "$FZF_DEFAULT_COMMAND"
|
||||||
|
)' \
|
||||||
|
--bind "ctrl-l:reload( \
|
||||||
|
mpc ls {}
|
||||||
|
)" \
|
||||||
|
--bind 'enter:execute-silent( \
|
||||||
|
mpc clear && mpc add {} && mpc play \
|
||||||
|
)' \
|
||||||
|
--bind 'ctrl-u:execute-silent( \
|
||||||
|
mpc update
|
||||||
|
)' \
|
||||||
|
--bind 'ctrl-space:execute-silent(mpc toggle)' \
|
||||||
|
--preview 'mpc ls {}'
|
||||||
|
}
|
||||||
|
|
||||||
|
mp
|
Loading…
Reference in a new issue