Hi

> I'm trying to get colors right in tmux and just updated to the latest 
> snapshot to see if I get it running.
> 
> Ways I'm trying to initialize tmux:
> 
> $ TERM=screen tmux
> $ TERM=screen tmux -2
> $ TERM=screen tmux -8
> $ TERM=screen tmux -d

Unless you are running tmux inside screen, you should not use TERM=screen
outside.

You should have TERM=screen /inside/ tmux. tmux will set that itself but you
should be careful not to change it in shell startup files.

> Actually this problem appears specifically when running alpine. When in 
> tmux, I can just see one or one or two colors. No problem in mc. Is this e

By default, it appears alpine has colours disabled. Can you go to the colour
menu (S then K), and make sure the color style is set to "use-termdef"?

> related to the application itself? No problems running in screen, 
> though.
> 
> Speaking of layouts, it seems that some commands which work inside tmux 
> can't be used in ~/.tmux.conf:
> 
> I'm trying this in ~/.tmux.conf:
> 
> select-layout main-vertical
> 
> I get this:
> 
> /home/dbolgheroni/.tmux.conf: can't establish current session at line 3

You are trying to set the layout before any sessions have been created, see
below.

> No problem if I comment this line.
> 
> If I use something like new-window in conf file, tmux doesn't get 
> started, nor an error message shows up.

This is probably due to a bug I have fixed earlier today (cmd.c r1.9).

Even with this fix, you will not be able to use new-window/select-layout in the
configuration file without creating a session first.

The usual way to create initial windows in the configuration file is to have
something like:

# create new session with emacs in window 0
new emacs
# create some more windows
neww top
neww
# split the previous window and set its layout
splitw
splitw
selectl even-vertical

Then start the tmux server with "tmux attach" (or "tmux start").

If you start it with "tmux new", tmux will load the configuration file -
creating the session and windows with the commands in it - then create the
second new session requested by the "new" command on the command line. I'd like
to make this a bit more obvious but so far I haven't thought of a good
solution.

> Also, when in tmux, I can't have the behaviour expected by main-vertical 
> unless I already splitted window. Is this normal?

I don't understand what you mean. None of the layouts can do anything unless
you have multiple panes already. If you want to force a window to take up only
part of the full terminal size, you can use the force-width and force-height
options.

Regards

Nicholas

Reply via email to