diff options
-rwxr-xr-x | tmux/.local/bin/tmux-projectr | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tmux/.local/bin/tmux-projectr b/tmux/.local/bin/tmux-projectr index d32aa9c..2e17a21 100755 --- a/tmux/.local/bin/tmux-projectr +++ b/tmux/.local/bin/tmux-projectr @@ -1,16 +1,18 @@ #!/bin/sh if [ "$#" -eq 0 ]; then - GIT_PREVIEW='onefetch --include-hidden {}' - DIR_PREVIEW='tree -CL 3 --gitignore --noreport --filelimit=50 {}' - PREVIEW_CMD="($GIT_PREVIEW || $DIR_PREVIEW) 2>/dev/null" + PREVIEW_CMD='( + onefetch --include-hidden --no-art --no-color-palette {} + printf "\n" + tree -CL 3 --gitignore --noreport --filelimit=50 {} + ) 2>/dev/null' # shellcheck disable=2046 set -- $( projectr -mgt ~/src ~/pkg ~/dkr ~/doc -P ~/.dotfiles --exclude-cwd | - fzf-tmux "$FZF_TMUX_OPTS" -- --tac --select-1 --exit-0 -d/ --with-nth 4.. \ - --bind 'focus:transform-header(echo {})' \ - --preview-window='right,75%,<80(hidden)' --preview="$PREVIEW_CMD" + fzf-tmux -p100,30 -- --tac --select-1 --exit-0 -d/ --with-nth 4.. \ + --bind "focus:transform-header(echo {} | sed 's|$HOME|~|')" \ + --preview-window='right,60,<60(hidden)' --preview="$PREVIEW_CMD" ) test -n "$1" || exit 0 |