I don’t really use tmux often, but I certainly do like a nice presentation and useful features, hence this configuration. This config file is inspired by gpakosz’s tmux configuration repo you can find [[https://github.com/gpakosz/.tmux][here]].
Whether to activate RGB 24-bit color support (only available in tmux >= 2.2). Possible values are:
- ~true~
- ~false~ (default)
#+BEGIN_SRC conf-unix
tmux_conf_theme_24b_colour=false
#+END_SRC
These variables are for chosing the window style. I use the default one.
#+BEGIN_SRC conf-unix
tmux_conf_theme_window_fg='default'
tmux_conf_theme_window_bg='default'
#+END_SRC
Whether the focused pane should be highlighted (only available in tmux >= 2.1). Possible values are:
- ~true~
- ~false~ (default)
#+BEGIN_SRC conf-unix
tmux_conf_theme_highlight_focused_pane=false
#+END_SRC
Set the terminal title. Built-in variables are:
- =#{circled_window_index}=
- =#{circled_session_name}=
- =#{hostname}=
- =#{hostname_ssh}=
- =#{username}=
- =#{username_ssh}=
#+BEGIN_SRC conf-unix
tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W'
#+END_SRC
These variables set the left/right separators between sections. With the current values, you don’t need to install Powerline, but only fonts patched with Powerline symbols or the standalone PowerlineSymbols.otf font.
Colors displayed in tmux can be chosen thanks to the following variables. Any color should be formatted as a hexadecimal RGB value preceded by a pound sign =#= (e.g. =#00afff= for light blue) or =default= to let our terminal set it for us.
Choose the style of the pane borders. Possible values are:
- ~thin~ (default)
- ~fat~
#+BEGIN_SRC conf-unix
tmux_conf_theme_pane_border_style=thin
#+END_SRC
Declare what the colors of the focused pane should be. The first variable specifies the foreground color, the other the background color.
#+BEGIN_SRC conf-unix
tmux_conf_theme_focused_pane_fg='default'
tmux_conf_theme_focused_pane_bg='#0087d7'
#+END_SRC
Here you can set the colors of the pane borders.
#+BEGIN_SRC conf-unix
tmux_conf_theme_pane_border='#444444'
tmux_conf_theme_pane_active_border='#00afff'
#+END_SRC
With these variables, you can set the colors for the pane indicators.
#+BEGIN_SRC conf-unix
tmux_conf_theme_pane_indicator='#00afff'
tmux_conf_theme_pane_active_indicator='#00afff'
#+END_SRC
These variables set the colors and the style of the status line.
#+BEGIN_SRC conf-unix
tmux_conf_theme_message_fg='#000000'
tmux_conf_theme_message_bg='#ffff00'
tmux_conf_theme_message_attr='bold'
#+END_SRC
Same as above for the status line command style.
#+BEGIN_SRC conf-unix
tmux_conf_theme_message_command_fg='#ffff00'
tmux_conf_theme_message_command_bg='#000000'
tmux_conf_theme_message_command_attr='bold'
#+END_SRC
These variables set the style of the window modes.
Set the clock style. If it is displayed on the right side of the status bar, it might be better to use =%I:%M %p= rather than =%R= in =tmux_conf_theme_status_right=.
Here we can override or undo some setting from settings from tmux. First, we can increase the history size.
#+BEGIN_SRC conf-unix
set -g history-limit 10000
#+END_SRC
We can also start with mouse mode enabled. But I don’t.
#+BEGIN_SRC conf-unix
#set -g mouse on
#+END_SRC
Whether or not Vi mode should be enabled. But really, we should rather export the =VISUAL= or =EDITOR= environment variables, see the tmux manual. Although I don’t, as said in my dotfish, I prefer to use Emacs.
#+BEGIN_SRC conf-unix
#set -g status-keys vi
#set -g mode-keys vi
#+END_SRC
Replace =C-b= by =C-a= instead of using both prefixes. I personally prefer to just use =C-b=, hence why the lines are commented.