Skip to content

Instantly share code, notes, and snippets.

@holybit
Last active December 22, 2015 01:09
Show Gist options
  • Save holybit/6394765 to your computer and use it in GitHub Desktop.
Save holybit/6394765 to your computer and use it in GitHub Desktop.
New tmux session to split window into two panes. Want to set TERM=screen-256color on both panes, but the script only sets it on pane :1 and not also pane :0. I am trying to use sync panes, but not seeming to work.
txsi() {
local session=foo
tmux new-session -d -s "$session"
tmux select-window -t "$session":0
tmux split-window -h
tmxu select-pane -t 0
tmux synchronize-panes on
tmux send-keys "export TERM=screen-256color" C-m
tmux synchronize-panes off
tmxu select-pane -t 1
tmux resize-pane -x 21
tmxu select-pane -t 0
tmux -2 attach-session -t "$session"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment