diff --git a/.tmux.conf b/.tmux.conf index 59db151..634acf8 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -56,7 +56,7 @@ 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_current_path}' -E "gitui" -bind -n M-e display-popup -h '60%' -w '80%' -b rounded -d '#{pane_current_path}' -E "~/bin/tmux-edit-helper" +bind -n M-e display-popup -h '40%' -w '90%' -y 0 -b rounded -d '#{pane_current_path}' -e FZF=fzf -E "~/bin/tmux-edit-helper" bind -n M-m display-popup -h '90%' -w '90%' -b rounded -d '#{pane_current_path}' -E "~/bin/tmux-build-helper" setw -g window-status-format "" diff --git a/.zshrc b/.zshrc index 6865284..81b30a0 100644 --- a/.zshrc +++ b/.zshrc @@ -62,7 +62,7 @@ redraw-prompt() { zle -N redraw-prompt _jump() { - _dir=$(fre --sorted | fzf-tmux --no-sort -p 90%,50% -y 0) + _dir=$(fre --sorted | fzf-tmux --no-sort -p 90%,40% -y 0) [ -n "$_dir" ] && pushd $_dir >>/dev/null zle && zle redraw-prompt } @@ -76,7 +76,7 @@ chpwd_functions+=fre_chpwd _cwd_gitroot() { _gitroot=$(git rev-parse --show-toplevel 2>/dev/null || pwd) - _dir=$((echo "$_gitroot" && fd -td . "$_gitroot") | fzf-tmux -p 90%,50% -y 0) + _dir=$((echo "$_gitroot" && fd -td . "$_gitroot") | fzf-tmux -p 90%,40% -y 0) [ -n "$_dir" ] && cd $_dir zle && zle redraw-prompt } @@ -103,9 +103,8 @@ export LESS="--mouse --wheel-lines=1 -nRXF" function clip { echo -en "\x1b]52;c;$(base64 -w0)\x07" } ## Aliases -alias b='tmux display-popup -h "60%" -w "80%" -b rounded -d "$(pwd)" -e "BUILD_COMMAND=${BUILD_COMMAND}" -E "~/bin/tmux-build-helper"' alias c='cut -c-${COLUMNS}' -alias e='tmux display-popup -h "60%" -w "80%" -b rounded -d "$(pwd)" -E "~/bin/tmux-edit-helper"' +alias e='tmux-edit-helper' alias dotgit='git --work-tree $HOME --git-dir $HOME/.dot_git' alias l=bat alias ls=exa diff --git a/bin/tmux-edit-helper b/bin/tmux-edit-helper index 4ea7709..5c5b5d9 100755 --- a/bin/tmux-edit-helper +++ b/bin/tmux-edit-helper @@ -4,9 +4,10 @@ set -fe -o pipefail if [ -n "$1" ]; then _file=$(readlink -f "$@") else + FZF=${FZF:-"fzf-tmux -p 90%,50% -y 0"} _git_root=$(git rev-parse --show-toplevel 2>/dev/null || pwd) _store=$(echo "$_git_root" | sha1sum | cut -d ' ' -f 1) - _file=$( (fre --store_name "$_store" --sorted && fd --type f --hidden --follow --exclude .git . "$_git_root") | fzf) + _file=$( (fre --store_name "$_store" --sorted && fd --type f --hidden --follow --exclude .git . "$_git_root") | $FZF) fre --store_name "$_store" --add "$_file" fi