16

I'm looking for the default .tmux.conf or something like it. I'm trying to get rid of some noise in the status line that the default creates.

2

2 Answers 2

22

The default configuration is not available as a normal configuration file; it is part of the source code (thus built into the compiled program).

You can examine parts of the configuration with the commands list-keys and show-options:

tmux list-keys         # show current bindings

tmux show-options -s   # show current server options

tmux show-options -g   # show current global session options
tmux show-options      # show current session options

tmux show-options -gw  # show current global window options
tmux show-options -w   # show current window options

With tmux 1.7, show-options can also show you the value of a single option (prior versions can only list all the options from the specified class):

tmux show-options -gw window-status-format

If you are interested in the default configuration that a “pristine” server would have, then you can examine those items like this:

tmux -L unconfigured -f /dev/null start-server \; list-keys \; show-options -s \; show-options -g \; show-options -gw

The -L unconfigured bit specifies a server socket that you are probably not already using (if you happen to have a server using that socket name, then just pick some other, unused name). The -f /dev/null makes sure that the server does not use your normal ~/.tmux.conf configuration file (though, short of a custom build, there is no way to skip the /etc/tmux.conf system configuration file). The start-server command is necessary because only certain commands will automatically start a server.


If you are interested in looking at the source code here are the areas of interest:

  • the options are defined in options-table.c in these arrays:
    • server_options_table
    • session_options_table
    • window_options_table
  • the bindings start in key_bindings_init() in key-bindings.c, but some of the details are spread out with the individual command definitions (e.g. cmd_select_window_key_binding() in cmd-select-window.c).
1
  • also a good answer which perhaps helps one or two to understand the concept and the reason for the different kinds of settings: superuser.com/a/759156/403979 Commented Oct 31, 2019 at 9:24
3

There should be one in your $HOME/.tmux.conf specific to your user and a system-wide config file located at /etc/tmux.conf

2
  • 2
    I made the $HOME/.tmux.conf myself, and /etc/tmux.conf doesn't exist. Commented Mar 4, 2013 at 8:22
  • 1
    Most Linux distributions do not ship with any tmux config files, not even empty ones. But if you do create one tmux should parse through these config files. Do you find any particular option not being retained when you restart tmux ?
    – Tuxdude
    Commented Mar 4, 2013 at 8:44

You must log in to answer this question.

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