major rewrite, closes #10, #23, #30 and #31

- status-justify aware status line
- flexible status line definition with many new variables/indicators:
  - #{battery_bar}, #{battery_vbar}, #{battery_percentage}
  - #{uptime_d}, #{uptime_h}, #{uptime_m}, #{uptime_s}
  - #{pairing}, #{prefix}, #{root}
  - #{username}, #{username_ssh}, #{hostname}, #{hostname_ssh}
  - ...
- smart username and hostname variables:
  - detects root user
  - detects SSH sessions to remote servers
- support for circled session names (when number) and window identifiers up to 20:
  - #{circled_session_name}, #{circled_window_index}
- support for connecting to the same host when splitting a pane running an SSH session
- support for 24b colours
- support for OpenBSD (tested with OpenBSD 6.0)
- cleaned everything with shellcheck
This commit is contained in:
Gregory Pakosz 2016-09-03 19:49:55 +02:00
parent 15d593398f
commit 1503232773
3 changed files with 1056 additions and 588 deletions

1057
.tmux.conf

File diff suppressed because it is too large Load Diff

View File

@ -1,117 +1,233 @@
# https://github.com/gpakosz/.tmux
# (‑●‑●)> released under the WTFPL v2 license, by Gregory Pakosz (@gpakosz)
# use the powerline patched font variant of the theme, possible values are:
# - default
# - powerline
tmux_conf_theme=default
#tmux_conf_theme=powerline
# display an indicator in the status line when the prefix key has been pressed,
# possible values are:
# - enabled
# - disabled
tmux_conf_theme_prefix=disabled
#tmux_conf_theme_prefix=enabled
# display the battery information in the status line, possible values are:
# - enabled
# - disabled
tmux_conf_theme_battery=enabled
#tmux_conf_theme_battery=disabled
# style to use for the battery status, possible values are:
# - bar
# - percentage
tmux_conf_battery_style=bar
#tmux_conf_battery_style=percentage
# symbols to use for battery status, possible values are:
# - block
# - heart
tmux_conf_battery_symbol=block
#tmux_conf_battery_symbol=heart
# number of symbols to use for battery status
tmux_conf_battery_symbol_count=auto
#tmux_conf_battery_symbol_count=5
# palette used for the battery status, possible values are:
# - 'colour_full_fg,colour_empty_fg,colour_bg'
# - heat
# - gradient
tmux_conf_battery_palette='#d70000,#e4e4e4,#000000'
#tmux_conf_battery_palette=colour160,colour254,colour16
#tmux_conf_battery_palette=heat
#tmux_conf_battery_palette=gradient
# display the battery status: charging (U+26A1) / discharging (U+1F50B)
tmux_conf_battery_status=enabled
#tmux_conf_battery_status=disabled
# or alternatively use an external tool, e.g. https://github.com/Goles/Battery
#tmux_conf_battery='#(battery -t) '
# display the time in the status line, possible values are:
# - enabled
# - disabled
tmux_conf_theme_time=enabled
#tmux_conf_theme_time=disabled
# display the date in the status line, possible values are:
# - enabled
# - disabled
tmux_conf_theme_date=enabled
#tmux_conf_theme_date=disabled
# display the username in the status line, possible values are:
# - enabled
# - disabled
# - ssh
tmux_conf_theme_username=enabled
#tmux_conf_theme_username=disabled
#tmux_conf_theme_username=ssh
# display the hostname in the status line, possible values are:
# - enabled
# - disabled
# - ssh
tmux_conf_theme_hostname=enabled
#tmux_conf_theme_hostname=disabled
#tmux_conf_theme_hostname=ssh
# highlight focused pane, possible values are:
# - enabled
# - disabled
tmux_conf_theme_highlight_focused_pane=disabled
#tmux_conf_theme_highlight_focused_pane=enabled
# should new windows retain current path, possible values are:
# - true
# - false
tmux_conf_new_windows_retain_current_path=false
#tmux_conf_new_windows_retain_current_path=true
# should new panes retain current path, possible values are:
# - true
# - false
tmux_conf_new_panes_retain_current_path=true
#tmux_conf_new_panes_retain_current_path=false
# prompt for session name when creating a new session, possible values are:
# - true
# - false
tmux_conf_new_session_prompt=false
#tmux_conf_new_session_prompt=true
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
# - and iTerm2 is configured to let option key act as +Esc
# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys
# then uncomment the following line to make Meta + arrow keys mapping work
#set -g terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D"
#set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D"
# -- windows & pane creation ---------------------------------------------------
# new window retains current path, possible values are:
# - true
# - false (default)
tmux_conf_new_window_retain_current_path=false
# new pane retains current path, possible values are:
# - true (default)
# - false
tmux_conf_new_pane_retain_current_path=true
# new pane tries to reconnect ssh sessions (experimental), possible values are:
# - true
# - false (default)
tmux_conf_new_pane_reconnect_ssh=false
# prompt for session name when creating a new session, possible values are:
# - true
# - false (default)
tmux_conf_new_session_prompt=false
# -- display -------------------------------------------------------------------
# RGB 24-bit colour support (since tmux 2.2), possible values are:
# - true
# - false (default)
tmux_conf_theme_24b_colour=false
# window style
tmux_conf_theme_window_fg='default'
tmux_conf_theme_window_bg='default'
# highlight focused pane (tmux 2.1+), possible values are:
# - true
# - false (default)
tmux_conf_theme_highlight_focused_pane=false
# focused pane colours:
tmux_conf_theme_focused_pane_fg='default'
tmux_conf_theme_focused_pane_bg='#0087d7' # light blue
# pane border style, possible values are:
# - thin (default)
# - fat
tmux_conf_theme_pane_border_style=thin
# pane borders colours:
tmux_conf_theme_pane_border='#444444' # gray
tmux_conf_theme_pane_active_border='#00afff' # light blue
# pane indicator colours
tmux_conf_theme_pane_indicator='#00afff' # light blue
tmux_conf_theme_pane_active_indicator='#00afff' # light blue
# status line style
tmux_conf_theme_message_fg='#000000' # black
tmux_conf_theme_message_bg='#ffff00' # yellow
tmux_conf_theme_message_attr='bold'
# status line command style (<prefix> : Escape)
tmux_conf_theme_message_command_fg='#ffff00' # yellow
tmux_conf_theme_message_command_bg='#000000' # black
tmux_conf_theme_message_command_attr='bold'
# window modes style
tmux_conf_theme_mode_fg='#000000' # black
tmux_conf_theme_mode_bg='#ffff00' # yellow
tmux_conf_theme_mode_attr='bold'
# status line style
tmux_conf_theme_status_fg='#8a8a8a' # light gray
tmux_conf_theme_status_bg='#080808' # dark gray
tmux_conf_theme_status_attr='none'
# window status style
# - built-in variables are:
# - #{circled_window_index}
tmux_conf_theme_window_status_fg='#8a8a8a' # light gray
tmux_conf_theme_window_status_bg='#080808' # dark gray
tmux_conf_theme_window_status_attr='none'
tmux_conf_theme_window_status_format='#I #W'
#tmux_conf_theme_window_status_format='#{circled_window_index} #W'
#tmux_conf_theme_window_status_format='#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}'
# window current status style
# - built-in variables are:
# - #{circled_window_index}
tmux_conf_theme_window_status_current_fg='#000000' # black
tmux_conf_theme_window_status_current_bg='#00afff' # light blue
tmux_conf_theme_window_status_current_attr='bold'
tmux_conf_theme_window_status_current_format='#I #W'
#tmux_conf_theme_window_status_current_format='#{circled_window_index} #W'
#tmux_conf_theme_window_status_current_format='#I #W#{?window_zoomed_flag,🔍,}'
# window activity status style
tmux_conf_theme_window_status_activity_fg='default'
tmux_conf_theme_window_status_activity_bg='default'
tmux_conf_theme_window_status_activity_attr='underscore'
# window bell status style
tmux_conf_theme_window_status_bell_fg='#ffff00' # yellow
tmux_conf_theme_window_status_bell_bg='default'
tmux_conf_theme_window_status_bell_attr='blink,bold'
# window last status style
tmux_conf_theme_window_status_last_fg='#00afff' # light blue
tmux_conf_theme_window_status_last_bg='default'
tmux_conf_theme_window_status_last_attr='none'
# status left/right sections separators
tmux_conf_theme_left_separator_main=''
tmux_conf_theme_left_separator_sub='|'
tmux_conf_theme_right_separator_main=''
tmux_conf_theme_right_separator_sub='|'
#tmux_conf_theme_left_separator_main='' # /!\ you don't need to install powerline
#tmux_conf_theme_left_separator_sub='' # you only need fonts patched with
#tmux_conf_theme_right_separator_main='' # powerline symbols or the standalone
#tmux_conf_theme_right_separator_sub='' # PowerlineSymbols.otf font
# status left/right content:
# - separate main sections with '|'
# - separate subsections with ','
# - built-in variables are:
# - #{battery_bar}
# - #{battery_percentage}
# - #{battery_status}
# - #{battery_vbar}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{pairing}
# - #{prefix}
# - #{root}
# - #{uptime_d}
# - #{uptime_h}
# - #{uptime_m}
# - #{uptime_s}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
tmux_conf_theme_status_right='#{prefix}#{pairing}#{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '
# status left style
tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4' # black, white , white
tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff' # yellow, pink, white blue
tmux_conf_theme_status_left_attr='bold,none,none'
# status right style
tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000' # light gray, white, black
tmux_conf_theme_status_right_bg='#080808,#d70000,#e4e4e4' # dark gray, red, white
tmux_conf_theme_status_right_attr='none,none,bold'
# pairing indicator
tmux_conf_theme_pairing='👓' # U+1F453
tmux_conf_theme_pairing_fg='none'
tmux_conf_theme_pairing_bg='none'
tmux_conf_theme_pairing_attr='none'
# prefix indicator
tmux_conf_theme_prefix='⌨' # U+2328
tmux_conf_theme_prefix_fg='none'
tmux_conf_theme_prefix_bg='none'
tmux_conf_theme_prefix_attr='none'
# root indicator
tmux_conf_theme_root='!'
tmux_conf_theme_root_fg='none'
tmux_conf_theme_root_bg='none'
tmux_conf_theme_root_attr='bold,blink'
# battery bar symbols
tmux_conf_battery_bar_symbol_full='◼'
tmux_conf_battery_bar_symbol_empty='◻'
#tmux_conf_battery_bar_symbol_full='♥'
#tmux_conf_battery_bar_symbol_empty='·'
# battery bar length (in number of symbols), possible values are:
# - auto
# - a number, e.g. 5
tmux_conf_battery_bar_length='auto'
# battery bar palette, possible values are:
# - gradient (default)
# - heat
# - 'colour_full_fg,colour_empty_fg,colour_bg'
tmux_conf_battery_bar_palette='gradient'
#tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000' # red, white, black
# battery vbar palette, possible values are:
# - gradient (default)
# - heat
# - 'colour_low,colour_half,colour_full'
tmux_conf_battery_vbar_palette='gradient'
#tmux_conf_battery_vbar_palette='#d70000,#ff5f00,#5fff00' # red, orange, green
# symbols used to indicate whether battery is charging or discharging
tmux_conf_battery_status_charging='⚡' # U+26A1
tmux_conf_battery_status_discharging='🔋' # U+1F50B
# clock style
tmux_conf_theme_clock_colour='#00afff' # light blue
tmux_conf_theme_clock_style='24'
# ------------------------------------------------------------------------------
# this is the place to further customize tmux's configuration
# this is the place to override or undo settings
# increase history size
#set -g history-limit 10000
# force Vi mode
# really you should export VISUAL or EDITOR environment variable, see manual
#set -g status-keys vi
#set -g mode-keys vi
# move status line to top
#set -g status-position top

265
README.md
View File

@ -3,26 +3,51 @@
Self-contained, pretty and versatile `.tmux.conf` configuration file.
![Screenshot](https://cloud.githubusercontent.com/assets/553208/9889393/85e50e4e-5bfa-11e5-99d8-76572350803a.gif)
![Screenshot](https://cloud.githubusercontent.com/assets/553208/19740585/85596a5a-9bbf-11e6-8aa1-7c8d9829c008.gif)
The `master` branch targets tmux `HEAD`. You may want to use the `1.9`, `2.0` or
`2.1` branch.
Installation
------------
Requirements:
- tmux **`2.1+`** running inside Linux, Mac, OpenBSD or Cygwin
- outside of tmux, `$TERM` must be set to `xterm-256color`
To install, run the following from your terminal:
```
$ cd
$ git clone https://github.com/gpakosz/.tmux.git
$ ln -s .tmux/.tmux.conf
$ cp .tmux/.tmux.conf.local .
```
Then proceed to customize your `~/.tmux.conf.local` copy.
If you're a Vim user, setting the `$EDITOR` environment variable to `vim` will
enable and further customize the vi-style key bindings (see tmux manual).
Features
--------
- `C-a` acts as secondary prefix, while keeping default `C-b` prefix
- visual theme inspired by [Powerline][]
- [maximize any pane to a new window with `<prefix> +`](http://pempek.net/articles/2013/04/14/maximizing-tmux-pane-new-window/)
- [maximize any pane to a new window with `<prefix> +`][maximize-pane]
- SSH aware username and hostname status line information
- mouse mode toggle with `<prefix> m`
- automatic usage of `reattach-to-user-namespace` if available
- laptop battery status
- optional highlight of focused pane (tmux `2.1`+)
- automatic usage of [`reattach-to-user-namespace`][reattach-to-user-namespace]
if available
- laptop battery status line information
- uptime status line information
- optional highlight of focused pane (tmux `2.1+`)
- configurable new windows and panes behavior (optionally retain current path)
- SSH aware split pane (reconnects to remote server, experimental)
- [Facebook PathPicker][] integration if available
- [Urlview][] integration if available
[Powerline]: https://github.com/Lokaltog/powerline
[maximize-pane]: http://pempek.net/articles/2013/04/14/maximizing-tmux-pane-new-window/
[reattach-to-user-namespace]: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
[Facebook PathPicker]: https://facebook.github.io/PathPicker/
[Urlview]: https://packages.debian.org/stable/misc/urlview
@ -61,8 +86,8 @@ Bindings for the `vi-choice` mode-table:
- `l` expands the current tree node
- `H` collapses all the tree nodes
- `L` expands all the tree nodes
- `K` jumps to the start of list (tmux 2.0+)
- `L` jumps to the end of list (tmux 2.0+)
- `K` jumps to the start of list (tmux `2.0+`)
- `L` jumps to the end of list (tmux `2.0+`)
- `Escape` cancels the current operation
Bindings for the `vi-edit` mode-table:
@ -82,47 +107,33 @@ Bindings for the `vi-copy` mode-table:
- `Escape` cancels the current operation
The "maximize any pane to a new window with `<prefix> +`" feature is different
from stock `resize-pane -Z` as it allows you to further split a maximized pane.
Also, you can maximize a pane to a new window, then change window, then go back
and the pane is still in maximized state in its own window. You can then
minimize a pane by using `<prefix> +` either from the source window or the
maximized window.
from builtin `resize-pane -Z` as it allows you to further split a maximized
pane. It's also more flexible by allowing you to maximize a pane to a new
window, then change window, then go back and the pane is still in maximized
state in its own window. You can then minimize a pane by using `<prefix> +`
either from the source window or the maximized window.
![Maximize pane](https://cloud.githubusercontent.com/assets/553208/9890858/ee3c0ca6-5c02-11e5-890e-05d825a46c92.gif)
Mouse mode allows you to set the active window, set the active pane, resize
panes and select switch to copy-mode to select text.
panes and automatically switches to copy-mode to select text.
![Mouse mode](https://cloud.githubusercontent.com/assets/553208/9890797/8dffe542-5c02-11e5-9c06-a25b452e6fcc.gif)
Installation
------------
$ cd
$ rm -rf .tmux
$ git clone https://github.com/gpakosz/.tmux.git
$ ln -s .tmux/.tmux.conf
$ cp .tmux/.tmux.conf.local .
If you're a Vim user, setting the `$EDITOR` environment variable to `vim` will
enable and further customize the vi-style key bindings (see tmux manual).
Configuration
-------------
While this configuration tries to bring sane default settings, you may want to
customize it further to your needs. Instead of altering the `~/.tmux.conf` file
and diverging from upstream, the proper way is to edit the `~/.tmux.conf.local`
file:
file.
echo "set -g history-limit 10000" >> ~/.tmux.conf.local
You will also notice the default `.tmux.conf.local` file contains variables you
can change to alter different behaviors. Pressing `<prefix> e` will open
Please refer to the default `.tmux.conf.local` file to know more about variables
you can adjust to alter different behaviors. Pressing `<prefix> e` will open
`~/.tmux.conf.local` with the editor defined by the `$EDITOR` environment
variable (defaults to `vim` when empty).
### Enabling the Powerline like visual theme
### Enabling the Powerline look
Powerline originated as a status-line plugin for Vim. Its popular eye-catching
look is based on the use of special symbols: <img width="80" alt="Powerline Symbols" style="vertical-align: middle;" src="https://cloud.githubusercontent.com/assets/553208/10687156/1b76dda6-796b-11e5-83a1-1634337c4571.png" />
@ -130,156 +141,68 @@ look is based on the use of special symbols: <img width="80" alt="Powerline Symb
To make use of these symbols, there are several options:
- use a font that already bundles those: this is e.g. the case of the
[2.010R-ro/1.030R-it version][source code pro] of the Source Code Pro] font
[2.030R-ro/1.050R-it version][source code pro] of the Source Code Pro] font
- use a [pre-patched font][powerline patched fonts]
- use your preferred font along with the [Powerline font][powerline font] (that
only contains the Powerline symbols): this highly depends on your operating
system and your terminal emulator
only contains the Powerline symbols): [this highly depends on your operating
system and your terminal emulator][terminal support]
- [patch your preferred font][powerline font patcher] by adding the missing
Powerline symbols: this is the most difficult way and is no more documented in
the Powerline manual
the [Powerline manual]
[source code pro]: https://github.com/adobe-fonts/source-code-pro/releases/tag/2.010R-ro%2F1.030R-it
[source code pro]: https://github.com/adobe-fonts/source-code-pro/releases/tag/2.030R-ro/1.050R-it
[powerline patched fonts]: https://github.com/powerline/fonts
[powerline font]: https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
[powerline font patcher]: https://github.com/powerline/fontpatcher
[terminal support]: http://powerline.readthedocs.io/en/master/usage.html#usage-terminal-emulators
[Powerline manual]: http://powerline.readthedocs.org/en/latest/installation.html#fonts-installation
Please see the [powerline manual] for further details.
Please see the [Powerline manual] for further details.
Then edit the `~/.tmux.conf.local` file (`<prefix> e`) and adjust the
`tmux_conf_theme` variable:
Then edit the `~/.tmux.conf.local` file (`<prefix> e`) and adjust the following
variables:
tmux_conf_theme=powerline
```
tmux_conf_theme_left_separator_main=''
tmux_conf_theme_left_separator_sub=''
tmux_conf_theme_right_separator_main=''
tmux_conf_theme_right_separator_sub=''
```
### Configuring the status line
The possible values for `tmux_conf_theme` are `default` and `powerline`.
Contrary to the first iterations of this configuration, by now you have total
control on the content and order of `status-left` and `status-right`.
[fonts patched with powerline symbols]: https://github.com/Lokaltog/powerline-fonts
[powerline manual]: http://powerline.readthedocs.org/en/latest/installation.html#fonts-installation
Edit the `~/.tmux.conf.local` file (`<prefix> e`) and adjust the
`tmux_conf_theme_status_left` and `tmux_conf_theme_status_right` variables to
your own preferences.
### Configuring the prefix indicator
This configuration supports the following builtin variables:
To enable or disable the prefix indicator (whether the `<prefix>` key has been
pressed), edit the `~/.tmux.conf.local` file (`<prefix> e`) and adjust the
`tmux_conf_theme_prefix` variable:
tmux_conf_theme_prefix=enabled
![image](https://cloud.githubusercontent.com/assets/553208/10802009/722de4a2-7dba-11e5-8361-8d024cd3aa45.png)
The possible values for `tmux_conf_theme_prefix` are `enabled` or `disabled`
(default).
### Configuring the battery indicator
To enable or disable the battery indicator, edit the `~/.tmux.conf.local` file
(`<prefix> e`) and adjust the `tmux_conf_theme_battery` variable:
tmux_conf_theme_battery=enabled
The possible values for `tmux_conf_theme_battery` are `enabled` (default) or
`disabled`.
The battery indicator can either be a charging bar or a percentage which is
controlled by the `tmux_conf_battery_style` variable:
tmux_conf_battery_style=bar
The possible values for `tmux_conf_battery_style` are `bar` (default) or
`percentage`.
You can also customize the symbol used in the battery bar as well as their
number by adjusting the `tmux_conf_battery_symbol` and
`tmux_conf_battery_symbol_count` variables.
tmux_conf_battery_symbol=heart
tmux_conf_battery_symbol_count=5
The possible values for `tmux_conf_battery_symbol` are `block` (default) or
`heart`. The default number of symbol displayed is `10`.
To customize the battery bar colors, adjust the `tmux_conf_battery_palette`
variable. You can either specify a `'colour_full_fg,colour_empty_fg,colour_bg'`
colour triplet or one of the `heat` or `gradient` aliases. See tmux manual for
colours definition:
> The colour is one of: black, red, green, yellow, blue, magenta, cyan, white,
> aixterm bright variants (if supported: brightred, brightgreen, and so on),
> colour0 to colour255 from the 256-colour set, default, or a hexadecimal RGB
> string such as `#ffffff`, which chooses the closest match from the default
> 256-colour set.
To use the heat palette for the battery indicator, use:
tmux_conf_battery_palette=heat
To use the gradient palette for the battery indicator, use:
#tmux_conf_battery_palette=heat
To disable the battery charging (⚡ U+26A1) / discharging
(🔋 U+1F50B) status, adjust the `tmux_conf_battery_status` variable:
tmux_conf_battery_status=disabled
The possible values for `tmux_conf_battery_status` are `enabled` (default) or
`disabled`.
### Configuring the date and time
To disable the display of date and time, edit the `~/.tmux.conf.local` file
(`<prefix> e`) and adjust the `tmux_conf_theme_date` and
`tmux_conf_theme_time` variables:
tmux_conf_theme_time=disabled
tmux_conf_theme_date=disabled
The possible values for `tmux_conf_theme_date` and `tmux_conf_theme_time` are
`enabled` (default) or `disabled`.
### Configuring the username and hostname
To disable the display of username and hostname, edit the `~/.tmux.conf.local`
file (`<prefix> e`) and adjust the `tmux_conf_theme_username` and
`tmux_conf_theme_hostname` variables:
tmux_conf_theme_username=disabled tmux_conf_theme_hostname=disabled
The possible values for `tmux_conf_theme_username` and
`tmux_conf_theme_hostname` are `enabled` (default) or `disabled`, or `ssh`.
When you set `tmux_conf_theme_username` or `tmux_conf_theme_hostname` to `ssh`,
information is displayed only if you're inside an SSH session.
### Configuring highlighting of the focused pane
To highlight the focused pane, edit the `~/.tmux.conf.local` file (`<prefix> e`)
and adjust the `tmux_conf_theme_highlight_focused_pane` variable:
tmux_conf_theme_highlight_focused_pane=enabled
The possible values for `tmux_conf_theme_highlight_focused_pane` variable are
`disabled` (default) or `enabled`.
This feature is only available from tmux `2.1`.
### Configuring new windows and new panes creation
To configure whether creating new windows and new panes retains the current
path, edit the `~/.tmux.conf.local` (`<prefix> e`) and adjust the
`tmux_conf_new_windows_retain_current_path` and
`tmux_conf_new_panes_retain_current_path` variables:
tmux_conf_new_windows_retain_current_path=false
tmux_conf_new_panes_retain_current_path=true
The possible values for `tmux_conf_new_windows_retain_current_path` and
`tmux_conf_new_panes_retain_current_path` are `true` or `false`.
- `#{battery_bar}`: horizontal battery charge bar
- `#{battery_percentage}`: battery percentage
- `#{battery_status}`: is battery charging or discharging?
- `#{battery_vbar}`: vertical battery charge bar
- `#{circled_session_name}`: circled session number, up to 20
- `#{hostname}`: SSH aware hostname information
- `#{hostname_ssh}`: SSH aware hostname information, blank when no SSH
connection detected
- `#{pairing}`: is session attached to more than one client?
- `#{prefix}`: is prefix being depressed?
- `#{root}`: is current user root?
- `#{uptime_d}`: uptime days
- `#{uptime_h}`: uptime hours
- `#{uptime_m}`: uptime minutes
- `#{uptime_s}`: uptime seconds
- `#{username}`: SSH aware username information
- `#{username_ssh}`: SSH aware username information, blank when no SSH
connection detected
### Accessing the Mac OSX clipboard from within tmux sessions
[Chris Johnsen created the `reattach-to-user-namespace`
utility](https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard) that makes
`pbcopy` and `pbpaste` work again within tmux.
utility][reattach-to-user-namespace] that makes `pbcopy` and `pbpaste` work
again within tmux.
To install `reattach-to-user-namespace`, use either [MacPorts][] or
[Homebrew][]:
@ -297,7 +220,7 @@ Once installed, `reattach-to-usernamespace` will be automatically detected.
### Using the configuration under Cygwin within Mintty
![image](https://cloud.githubusercontent.com/assets/553208/10802824/32539f02-7dbf-11e5-9377-2008192a7396.png)
![cygwin](https://cloud.githubusercontent.com/assets/553208/19741789/67a3f3d8-9bc2-11e6-9ecc-499fc0228ee6.png)
It is possible to use this configuration under Cygwin within Mintty, however
support for Unicode symbols and emojis lacks behind Mac and Linux.
@ -306,19 +229,15 @@ Particularly, Mintty's text rendering is implemented with GDI which has
limitations:
- color emojis are only available through DirectWrite starting with Windows 8.1
- display double width symbols, like the battery discharging symbol indicator
- display of double width symbols, like the battery discharging symbol indicator
(U+1F50B) is buggy
As a consequence, under Cygwin, the battery charging (⚡ U+26A1) status indicator
is rendered as a monochrome lightning bolt instead of a colorful emoji while the
discharging (🔋 U+1F50B) one is simply disabled.
Also, to get the battery charging status indicator displayed properly, you have
to use [font linking]. Open `regedit.exe` then navigate to the registry key at
To get Unicode symbols displayed properly, you have to use [font linking].
Open `regedit.exe` then navigate to the registry key at
`HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink`
and add a new entry for you preferred font to link it with the Segoe UI Symbol
font.
![image](https://cloud.githubusercontent.com/assets/553208/10802432/26341fbe-7dbd-11e5-9be9-585348fe3c2c.png)
![regedit](https://cloud.githubusercontent.com/assets/553208/19741304/71a2f3ae-9bc0-11e6-96aa-4c09a812c313.png)
[font linking]: https://msdn.microsoft.com/en-us/goglobal/bb688134.aspx