commit 8512d74024b69613a55dbe6830ccc1a39239d6cd parent 6eab64b7fdc5dfc970d46548fbb5d01447eebe64 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Mon, 11 Feb 2019 08:31:11 +0100 Add fzf-mpd integration Diffstat:
M | links/.tmux.conf | | | 2 | +- |
M | links/.zshrc | | | 5 | +++-- |
M | links/bin/mpcdd | | | 4 | +++- |
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/links/.tmux.conf b/links/.tmux.conf @@ -223,7 +223,7 @@ bind -n C-M-s display "#(mpc stop | tr '\n' ' ')" bind -n C-M-n display "#(mpc next | tr '\n' ' ')" bind -n C-M-b display "#(mpc prev | tr '\n' ' ')" #bind -n C-M-r display "#(mpc clear && mpc ls | mpc add && mpc random on && mpc play | tr '\n' ' ')" -bind -n C-M-a split-window -p 50 "source ~/code/fzf-mpd/fzf-mpd.zsh fzf && fm" +bind -n C-M-a split-window -p 50 "source ~/code/fzf-mpd/fzf-mpd.zsh && fm" # Use alternate prefix (C-b) for grouping music-control bindings #bind -n C-b switchc -Tmoreprefix diff --git a/links/.zshrc b/links/.zshrc @@ -235,7 +235,8 @@ if [[ -o interactive ]]; then function chpwd { ls } fi +[ -f ~/code/fzf-mpd/fzf-mpd.zsh ] && . ~/code/fzf-mpd/fzf-mpd.zsh +[ -f ~/.fzf.zsh ] && . ~/.fzf.zsh + # report startup diagnostics if requested [ "$debug_startup" = true ] && zprof || : - -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh diff --git a/links/bin/mpcdd b/links/bin/mpcdd @@ -1,4 +1,6 @@ #!/bin/sh SESSION=mpc -tmux attach -t "$SESSION" || \ +(tmux attach -t "$SESSION" \; \ + split-window -p 50 "source ~/code/fzf-mpd/fzf-mpd.zsh && fm") \ + || \ (tmux new-session -s "$SESSION" \; send-keys "ncmpcpp; exit" C-m)