From 2bb22480efa6df73d017a349330738b8f2fb9170 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Sat, 23 Dec 2023 20:13:55 -0700 Subject: [PATCH] Fix vifm tmux popup window --- bash/.bash_functions | 2 +- vifm/vifmrc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bash/.bash_functions b/bash/.bash_functions index a0f6a2e..f8b4bcc 100644 --- a/bash/.bash_functions +++ b/bash/.bash_functions @@ -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 diff --git a/vifm/vifmrc b/vifm/vifmrc index dd264fa..6b66125 100644 --- a/vifm/vifmrc +++ b/vifm/vifmrc @@ -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