26 lines
539 B
Bash
Executable file
26 lines
539 B
Bash
Executable file
#!/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
|