tmux popup fixery
This commit is contained in:
parent
e67758a53d
commit
949fe999e3
3 changed files with 6 additions and 6 deletions
|
@ -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 ""
|
||||
|
|
7
.zshrc
7
.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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue