updated README.md
This commit is contained in:
parent
53abd1dca8
commit
300dc1d069
1 changed files with 57 additions and 25 deletions
82
README.md
82
README.md
|
@ -3,30 +3,32 @@
|
||||||
|
|
||||||
Self-contained, opinionated `.tmux.conf` configuration file.
|
Self-contained, opinionated `.tmux.conf` configuration file.
|
||||||
|
|
||||||
![Screenshot](https://cloud.githubusercontent.com/assets/553208/6979291/36999f48-d9e2-11e4-8815-449f7372b496.png)
|
![Screenshot](https://cloud.githubusercontent.com/assets/553208/9889393/85e50e4e-5bfa-11e5-99d8-76572350803a.gif)
|
||||||
|
|
||||||
The `master` branch targets tmux 1.9+. You may want to use the `1.7` or `1.8`
|
The `master` branch targets tmux `HEAD`. You may want to use the `1.9` or `2.0`
|
||||||
branch.
|
branch.
|
||||||
|
|
||||||
**Please note that the official tmux 1.9 and 1.9a SEGFAULT when using the
|
|
||||||
maximize pane feature. Some Linux distributions like Debian provide a patched
|
|
||||||
tmux 1.9a. Depending on whether or not the running tmux version has a buggy
|
|
||||||
`swap-pane` command, the maximize pane feature may be disabled. On Mac OS X,
|
|
||||||
I've been using tmux `HEAD` for a while without troubles (`brew install --HEAD
|
|
||||||
tmux`). The `swap-pane` command has been fixed in upstream by commit
|
|
||||||
`78e783e`.**
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- `C-a` acts as secondary prefix, while keeping default `C-b` prefix
|
- `C-a` acts as secondary prefix, while keeping default `C-b` prefix
|
||||||
- visual theme inspired by [powerline](https://github.com/Lokaltog/powerline)
|
- visual theme inspired by [powerline](https://github.com/Lokaltog/powerline)
|
||||||
- [maximize any pane to a new window with `<prefix>+`](http://pempek.net/articles/2013/04/14/maximizing-tmux-pane-new-window/) (tmux 1.6+)
|
- [maximize any pane to a new window with `<prefix>+`](http://pempek.net/articles/2013/04/14/maximizing-tmux-pane-new-window/)
|
||||||
- mouse mode toggle with `<prefix>m`
|
- mouse mode toggle with `<prefix>m`
|
||||||
- automatic usage of `reattach-to-user-namespace` if available
|
- automatic usage of `reattach-to-user-namespace` if available
|
||||||
- laptop battery status
|
- laptop battery status
|
||||||
- configurable new windows and panes behavior (optionally retain current path)
|
- configurable new windows and panes behavior (optionally retain current path)
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
![Maximize pane](https://cloud.githubusercontent.com/assets/553208/9890858/ee3c0ca6-5c02-11e5-890e-05d825a46c92.gif)
|
||||||
|
![Mouse mode](https://cloud.githubusercontent.com/assets/553208/9890797/8dffe542-5c02-11e5-9c06-a25b452e6fcc.gif)
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -36,15 +38,28 @@ Installation
|
||||||
$ ln -s .tmux/.tmux.conf
|
$ ln -s .tmux/.tmux.conf
|
||||||
$ cp .tmux/.tmux.conf.local .
|
$ cp .tmux/.tmux.conf.local .
|
||||||
|
|
||||||
If you're a ViM user, setting the `$EDITOR` environment variable to `vim` will
|
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).
|
enable and further customize the vi-style key bindings (see tmux manual).
|
||||||
|
|
||||||
### Configuring the visual theme
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
You first need to install [fonts patched with powerline symbols][] (see also
|
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:
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
### Enabling the Powerline like visual theme
|
||||||
|
|
||||||
|
You first need to install [fonts patched with powerline symbols][] (see also the
|
||||||
[powerline manual][]).
|
[powerline manual][]).
|
||||||
|
|
||||||
Then edit your `~/.tmux.conf.local` file and uncomment the following line:
|
Then edit the `~/.tmux.conf.local` file and uncomment the following line:
|
||||||
|
|
||||||
#tmux_conf_theme=powerline_patched_font
|
#tmux_conf_theme=powerline_patched_font
|
||||||
|
|
||||||
|
@ -53,35 +68,52 @@ Then edit your `~/.tmux.conf.local` file and uncomment the following line:
|
||||||
|
|
||||||
### Configuring the battery indicator
|
### Configuring the battery indicator
|
||||||
|
|
||||||
Edit your `~/.tmux.conf.local` file and uncomment the following lines:
|
Edit the `~/.tmux.conf.local` file and uncomment the following lines:
|
||||||
|
|
||||||
#tmux_conf_battery_symbol=heart
|
#tmux_conf_battery_symbol=heart
|
||||||
#tmux_conf_battery_symbol_count=5
|
#tmux_conf_battery_symbol_count=5
|
||||||
|
|
||||||
To use a heat palette for the battery indicator, edit your `~/.tmux.conf.local`
|
The possible values for `tmux_conf_battery_symbol` are `heart` or `block`
|
||||||
|
(default).
|
||||||
|
|
||||||
|
To use the heat palette for the battery indicator, edit the `~/.tmux.conf.local`
|
||||||
file and uncomment the following line:
|
file and uncomment the following line:
|
||||||
|
|
||||||
#tmux_conf_battery_palette=heat
|
#tmux_conf_battery_palette=heat
|
||||||
|
|
||||||
See `~/.tmux.conf.local` for more details.
|
To use the gradient palette for the battery indicator, edit the
|
||||||
|
`~/.tmux.conf.local` file and uncomment the following line:
|
||||||
|
|
||||||
|
#tmux_conf_battery_palette=heat
|
||||||
|
|
||||||
|
To display the battery charging (⚡ U+26A1) / discharging (🔋 U+1F50B) status
|
||||||
|
indicators, edit the `~/.tmux.conf.local` file and uncomment the following line:
|
||||||
|
|
||||||
|
#tmux_conf_battery_status=true
|
||||||
|
|
||||||
### Configuring new windows and new panes creation
|
### Configuring new windows and new panes creation
|
||||||
|
|
||||||
Edit your `~/.tmux.conf.local` file and uncomment the following lines:
|
Edit the `~/.tmux.conf.local` file and uncomment the following lines:
|
||||||
|
|
||||||
#tmux_conf_new_windows_retain_current_path=false
|
#tmux_conf_new_windows_retain_current_path=false
|
||||||
#tmux_conf_new_panes_retain_current_path=true
|
#tmux_conf_new_panes_retain_current_path=true
|
||||||
|
|
||||||
See `~/.tmux.conf.local` for more details.
|
|
||||||
|
|
||||||
### Accessing the Mac OSX clipboard from within tmux sessions
|
### Accessing the Mac OSX clipboard from within tmux sessions
|
||||||
|
|
||||||
[Chris Johnsen created the `reattach-to-user-namespace`
|
[Chris Johnsen created the `reattach-to-user-namespace`
|
||||||
utility](https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard) that makes
|
utility](https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard) that makes
|
||||||
`pbcopy` and `pbpaste` work again within `tmux`.
|
`pbcopy` and `pbpaste` work again within tmux.
|
||||||
|
|
||||||
If available, `reattach-to-user-namespace` will be automatically used by this
|
To install `reattach-to-user-namespace`, use either [MacPorts][] or
|
||||||
`tmux` configuration. You just have to install it for instance with
|
[Homebrew][]:
|
||||||
[`brew`](http://brew.sh/):
|
|
||||||
|
$ port install tmux-pasteboard
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
$ brew install reattach-to-user-namespace
|
$ brew install reattach-to-user-namespace
|
||||||
|
|
||||||
|
Once installed, `reattach-to-usernamespace` will be automatically detected.
|
||||||
|
|
||||||
|
[MacPorts]: http://www.macports.org/
|
||||||
|
[Homebrew]: http://brew.sh/
|
||||||
|
|
Loading…
Reference in a new issue