0

I'm trying to configure tmux so it starts creating a new session with three panes.

One big pane on the left und two small panes on the right side.

I set

set -g default-terminal "screen-256color"

in my tmux.conf - which can be found here.

I found a broken(?) solution for this:

# tmux session
rename-session foo
selectp -t 0
splitw -h -p 43 'ncmpcpp'
selectp -t 1
splitw -v -p 35 'ncmpcpp -s visualizer'
selectp -t 0

When using this, the first created pane, pane 0, has TERM=screen and not TERM=screen-256color. Both other panes, also new ones created, have TERM=screen-256color.

Any solution to this, or any other way how to create a session with only one window and X panes?

2 Answers 2

1

I have found that configuring sets of windows and/or panes to be much easier when using Tmuxinator which can also run arbitrary commands in each of the panes as well. Hope this helps...

0

Take a look at the github projects tony/tmuxp, remiprev/teamocil and the already mentioned tmuxinator. They follow the approach to let you predefine sessions in simple YAML (tmuxp also supports JSON style configs) files.

It's possible to provide one or more commands for the panes. tmuxp and tmuxinator also give you options to run commands before subsequent commands in panes and windows.

tmuxp gives you the option to run a before_script before the tmux session is build.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .