diff --git a/tmux_sidebar.sh b/tmux_sidebar.sh index 793fa84..57cc5ee 100755 --- a/tmux_sidebar.sh +++ b/tmux_sidebar.sh @@ -15,7 +15,7 @@ command=$(echo "$@") o_pane=$(tmux list-panes -F "#D") tmux split-window -h - c_pane=$(tmux list-panes -F "#D") + c_pane=$(tmux list-panes -F "#D" | grep -v "$o_pane") # Uncomment for left hand sidebar #tmux swap-pane -s "$o_pane" -t "$c_pane" printf '\033]2;%s\033\\' 'topbar' diff --git a/tmux_topbar.sh b/tmux_topbar.sh index ae8cd05..50e80d4 100755 --- a/tmux_topbar.sh +++ b/tmux_topbar.sh @@ -15,7 +15,7 @@ o_pane=$(tmux list-panes -F "#D") tmux split-window -v #"$command" - c_pane=$(tmux list-panes -F "#D") + c_pane=$(tmux list-panes -F "#D"| grep -v "$o_pane") tmux swap-pane -s "$o_pane" -t "$c_pane" printf '\033]2;%s\033\\' 'topbar' tmux resize-pane -t "$c_pane" -U 14