diff --git a/.tmux.conf b/.tmux.conf index 606cf3d..9432e59 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -63,10 +63,10 @@ bind-key -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 1 scroll-d bind-key / copy-mode \; send-key ? bind-key P 'capture-pane' \; capture-pane -S - \; save-buffer /tmp/tmux \; delete-buffer bind-key -n C-\\ copy-mode \; send -X search-backward " % "\; send -X search-again -bind -n M-g display-popup -h '90%' -w '90%' -b rounded -d '#{?pane_path,#{pane_path},#{pane_current_path}}' -E "gitui" -bind -n M-e display-popup -h '50%' -w '90%' -y 0 -b rounded -d '#{?pane_path,#{pane_path},#{pane_current_path}}' -e FZF=fzf -E "~/bin/tmux-edit-helper" -bind -n M-h display-popup -h '50%' -w '90%' -y 0 -b rounded -d '#{?pane_path,#{pane_path},#{pane_current_path}}' -e FZF=fzf -E "~/bin/tmux-edit-history" -bind -n M-m display-popup -h '90%' -w '90%' -b rounded -d '#{?pane_path,#{pane_path},#{pane_current_path}}' -E "~/bin/tmux-build-helper" +bind -n M-g display-popup -h '95%' -w '95%' -b rounded -d '#{?pane_path,#{pane_path},#{pane_current_path}}' -E "gitui" +bind -n M-e display-popup -h '95%' -w '95%' -y 0 -b rounded -S "fg=#77fecc" -s "fg=#99ccbb" -d '#{?pane_path,#{pane_path},#{pane_current_path}}' -e FZF=fzf -E "~/bin/tmux-edit-helper" +bind -n M-h display-popup -h '95%' -w '95%' -y 0 -b rounded -S "fg=#77fecc" -s "fg=#99ccbb" -d '#{?pane_path,#{pane_path},#{pane_current_path}}' -e FZF=fzf -E "~/bin/tmux-edit-history" +bind -n M-m display-popup -h '95%' -w '95%' -b rounded -S "fg=#77fecc" -s "fg=#99ccbb" -d '#{?pane_path,#{pane_path},#{pane_current_path}}' -E "~/bin/tmux-build-helper" setw -g window-status-format "" diff --git a/bin/tmux-edit-history b/bin/tmux-edit-history index 0cd4532..6631110 100755 --- a/bin/tmux-edit-history +++ b/bin/tmux-edit-history @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -eo pipefail -_file=$(fre --store_name edit-history --sorted | exec fzf --no-sort) +_file=$(fre --store_name edit-history --sorted | exec fzf --no-sort --preview "bat {}" --preview-window=down,70%,wrap,border-top --color=bg+:16,fg+:49,pointer:49 --layout=reverse "--bind=alt-e:become(tmux-edit-helper)") [ -n "$_file" ] && exec tmux-edit-helper "$_file" diff --git a/bin/tmux-hx-helper b/bin/tmux-hx-helper index 393deeb..9370832 100755 --- a/bin/tmux-hx-helper +++ b/bin/tmux-hx-helper @@ -8,10 +8,10 @@ PATH="$HOME/bin:$PATH" if [ -n "$1" ]; then _file=$(readlink -f "$@") else - FZF=${FZF:-"fzf-tmux -p 90%,50% -y 0"} + FZF=${FZF:-"fzf-tmux -p 90%,90% -y 0"} _root=$(git rev-parse --show-toplevel 2>/dev/null || pwd) _store=$(echo "$_root" | sha1sum | cut -d ' ' -f 1) - _file=$( ( (fre --store_name "$_store" --sorted | xargs -n 100 ls -d 2>/dev/null || true) && fd --type f --hidden --follow --exclude .git --ignore-file "${_root}/.gitignore" . "$_root") | cat -n | sort -k2 -k1n | uniq -f1 | sort -nk1,1 | cut -f2- | sed -e "s#^${_root}/##" | $FZF --no-sort) + _file=$( ( (fre --store_name "$_store" --sorted | xargs -n 100 ls -d 2>/dev/null || true) && fd --type f --hidden --follow --exclude .git --ignore-file "${_root}/.gitignore" . "$_root") | cat -n | sort -k2 -k1n | uniq -f1 | sort -nk1,1 | cut -f2- | sed -e "s#^${_root}/##" | $FZF --no-sort --preview "bat {}" --preview-window=bottom,70%,border-top --color=bg+:16,fg+:49,pointer:49 --layout=reverse "--bind=alt-e:become(tmux-edit-history)") _file="${_root}/${_file}" fre --store_name "$_store" --add "$_file" fi