mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Simplify preview-tui
This commit is contained in:
parent
16356e9d06
commit
9fddd416ca
|
@ -85,17 +85,15 @@ fi
|
||||||
if [ -e "${TMUX%%,*}" ] && [ "$(tmux -V | cut -c6)" -eq 3 ] ; then
|
if [ -e "${TMUX%%,*}" ] && [ "$(tmux -V | cut -c6)" -eq 3 ] ; then
|
||||||
if [ -z "$SPLIT" ]; then
|
if [ -z "$SPLIT" ]; then
|
||||||
if [ "$(( lines * 2 ))" -gt "$cols" ]; then
|
if [ "$(( lines * 2 ))" -gt "$cols" ]; then
|
||||||
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dv "$0" "$1"
|
SPLIT='v'
|
||||||
else
|
else
|
||||||
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dh "$0" "$1"
|
SPLIT='h'
|
||||||
fi
|
fi
|
||||||
elif [ "$SPLIT" = "h" ]; then
|
elif [ "$SPLIT" != "h" ] && [ "$SPLIT" != "v" ] ; then
|
||||||
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dh "$0" "$1"
|
SPLIT='h'
|
||||||
elif [ "$SPLIT" = "v" ]; then
|
|
||||||
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dv "$0" "$1"
|
|
||||||
else
|
|
||||||
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -dh "$0" "$1"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -d"$SPLIT" "$0" "$1"
|
||||||
else
|
else
|
||||||
PREVIEW_MODE=1 $TERMINAL -e "$0" "$1" &
|
PREVIEW_MODE=1 $TERMINAL -e "$0" "$1" &
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue