Fix vifm tmux popup window

This commit is contained in:
Akemi Izuko 2023-12-23 20:13:55 -07:00
parent 1108cef75b
commit 2bb22480ef
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC
2 changed files with 5 additions and 5 deletions

View file

@ -57,7 +57,7 @@ viw() {
fi
}
# Ronald's Universal Number Kruncher, standardized syntax for unix calculators
# Ronald's Universal Number Kounter, standardized syntax for unix calculators
# Syntax features:
# ^ and ** both work for exponentiation
# log() is base 10

View file

@ -255,28 +255,28 @@ command! navigateIfDir :if system('[[ ! -d '.expand('%c').' ]] || printf "T"') =
" Prefer to use popup window. Requires 90 $COLUMNS and tmux >=3.2. Yabai on
" MacOS causes it to crash regardless. Use full-screen as a fallback
command! fzfbmarks
\ :if $TMUX != '' && &columns > 90
\ :if $TMUX != '' && &columns > 90 && &lines >= 30
\ | exe 'cd "'.system('cat ~/.config/vifm/fzf-read/bookmarks | fzf-tmux -p 90,30 | sed "s/:.*//" ').'"'
\ | else
\ | exe 'cd "'.term('cat ~/.config/vifm/fzf-read/bookmarks | fzf 2>/dev/tty | sed "s/:.*//" ').'"'
\ | endif
command! fdcddir
\ :if $TMUX != '' && &columns > 90
\ :if $TMUX != '' && &columns > 90 && &lines >= 30
\ | exe 'cd "'.system('fd -HE ''.git'' -t d . | fzf-tmux -p 90,30').'"'
\ | else
\ | exe 'cd "'.term('fd -HE ''.git'' -t d . | fzf 2>/dev/tty').'"'
\ | endif
command! fdeditfiles
\ :if $TMUX != '' && &columns > 90
\ :if $TMUX != '' && &columns > 90 && &lines >= 30
\ | exe '!~/.configs_pointer/vifm/scripts/vifm_bg_open.sh "'.system('fd -HE ''.git'' -t f . | fzf-tmux -p 90,30').'"'
\ | else
\ | exe '!~/.configs_pointer/vifm/scripts/vifm_bg_open.sh "'.term('fd -HE ''.git'' -t f . | fzf 2>/dev/tty').'"'
\ | endif
command! fdmvcursor
\ :if $TMUX != '' && &columns > 90
\ :if $TMUX != '' && &columns > 90 && &lines >= 30
\ | exe 'goto "'.system('fd --maxdepth=1 -HE ''.git'' . | fzf-tmux -p 90,30').'"' | navigateIfDir
\ | else
\ | exe 'goto "'.term('fd --maxdepth=1 -HE ''.git'' . | fzf 2>/dev/tty').'"' | navigateIfDir