diff options
| -rwxr-xr-x | toggle-term.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/toggle-term.sh b/toggle-term.sh index d19fd70..ba6dc89 100755 --- a/toggle-term.sh +++ b/toggle-term.sh @@ -91,8 +91,10 @@ toggle_split() { # If we have more than 1 pane and none are zoomed in, we can assume the # screen has the split pane open. # - # To simulate 'toggling' between the main pane and the split - # pane, we 'zoom' the main pane so it takes up the full screen. + # So, to simulate 'toggling' between the main (first) pane and the split + # pane, we 'zoom' the main pane so it takes up the full screen. Because + # the initial pane index is configurable in tmux, we grab the first pane + # index dynamically. first_pane_index="$($TMUX_CMD list-panes -F '#{pane_index}' | head -n1)" $TMUX_CMD resize-pane -Z -t"$first_pane_index" } |