29 lines
880 B
Bash
Executable file
29 lines
880 B
Bash
Executable file
#!/usr/bin/env zsh
|
|
|
|
#
|
|
## music player with fzf+mpc
|
|
#
|
|
function mp {
|
|
FZF_DEFAULT_COMMAND="mpc ls" \
|
|
fzf \
|
|
--multi \
|
|
--bind 'ctrl-h:reload( \
|
|
eval "$FZF_DEFAULT_COMMAND"
|
|
)+change-preview-window(50%)+change-prompt(Artist> )' \
|
|
--bind 'ctrl-l:reload( \
|
|
mpc ls {}
|
|
)+change-preview-window(50%)+change-prompt(Album> )' \
|
|
--bind 'enter:execute-silent( \
|
|
mpc clear && mpc add {+} && mpc play \
|
|
)+clear-selection' \
|
|
--bind 'ctrl-u:execute-silent( \
|
|
mpc update
|
|
)' \
|
|
--bind 'ctrl-f:change-prompt(Playlist> )+reload(mpc playlist)+change-preview-window(hidden)' \
|
|
--bind 'ctrl-d:change-prompt(Database> )+reload(mpc listall)+change-preview-window(hidden)' \
|
|
--bind 'ctrl-space:execute-silent(mpc toggle)' \
|
|
--preview 'mpc ls {}'
|
|
}
|
|
|
|
mp
|