fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local
This commit is contained in:
parent
2505c76f88
commit
46d226236c
2 changed files with 37 additions and 31 deletions
|
@ -3,8 +3,11 @@
|
|||
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
|
||||
# without any warranty.
|
||||
# Copyright 2012— Gregory Pakosz (@gpakosz).
|
||||
# /!\ do not edit this file
|
||||
# instead, override your .local copy, see README.md
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# /!\ DO NOT EDIT THIS FILE
|
||||
# instead, override your .local copy, see README.md /!\
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# -- general -------------------------------------------------------------------
|
||||
|
|
61
README.md
61
README.md
|
@ -44,10 +44,10 @@ $ mkdir -p "~/.config/tmux"
|
|||
$ ln -s "/path/to/oh-my-tmux/.tmux.conf" "~/.config/tmux/tmux.conf"
|
||||
$ cp "/path/to/oh-my-tmux/.tmux.conf.local" "~/.config/tmux/tmux.conf.local"
|
||||
```
|
||||
⚠️ When installing `$XDG_CONFIG_HOME/tmux` or `~/.config/tmux`, the configuration
|
||||
file names don't have a leading `.` character.
|
||||
|
||||
Then proceed to [customize] your `.tmux.conf.local` or `tmux.conf.local` copy.
|
||||
|
||||
❗️ You should never alter the main `.tmux.conf` / `tmux.conf` file. If you do,
|
||||
❗️ You should never alter the main `.tmux.conf` or `tmux.conf` file. If you do,
|
||||
you're on your own. Instead, every customization happens in your
|
||||
`.tmux.conf.local` or `tmux.conf.local` copy.
|
||||
|
||||
|
@ -57,9 +57,11 @@ enable and further customize the vi-style key bindings (see tmux manual).
|
|||
If you're new to tmux, I recommend you read [tmux 2: Productive Mouse-Free
|
||||
Development][bhtmux2] by [@bphogan].
|
||||
|
||||
[customize]: #configuration
|
||||
Now proceed to [customize] your `.tmux.conf.local` or `tmux.conf.local` copy.
|
||||
|
||||
[bhtmux2]: https://pragprog.com/book/bhtmux2/tmux-2
|
||||
[@bphogan]: https://twitter.com/bphogan
|
||||
[customize]: #configuration
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
@ -83,16 +85,16 @@ Troubleshooting
|
|||
This can also happen on macOS when using iTerm2 and "Use Unicode version 9
|
||||
character widths" is enabled in `Preferences... > Profiles > Text`
|
||||
|
||||
For that reason, the default `~/.tmux.conf.local` file stopped using Unicode
|
||||
characters for which width changed in between Unicode 8.0 and 9.0 standards,
|
||||
as well as Emojis.
|
||||
For that reason, the default `.local` configuration file stopped using
|
||||
Unicode characters for which width changed in between Unicode 8.0 and 9.0
|
||||
standards, as well as Emojis.
|
||||
|
||||
- **I installed Powerline and/or (patched) fonts but can't see Powerline
|
||||
symbols.**
|
||||
|
||||
First, you don't need to install Powerline. You only need fonts patched with
|
||||
Powerline symbols or the standalone `PowerlineSymbols.otf` font. Then make
|
||||
sure your `~/.tmux.conf.local` copy uses the right code points for
|
||||
sure your `.local` configuration file copy uses the Powerline code points for
|
||||
`tmux_conf_theme_left_separator_XXX` values.
|
||||
|
||||
- **I'm using Bash On Windows (WSL), colors and Powerline look are broken.**
|
||||
|
@ -211,14 +213,16 @@ 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.
|
||||
customize it further to your needs.
|
||||
|
||||
❗️ Again, you should never alter the main `.tmux.conf` or `tmux.conf` file.
|
||||
If you do, you're on your own.
|
||||
|
||||
Please refer to the sample `.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).
|
||||
you can adjust to alter different behaviors. Upon successful installation,
|
||||
pressing `<prefix> e` will open your `.local` configuration file copy with the
|
||||
editor defined by the `$EDITOR` environment variable (defaults to `vim` when
|
||||
empty).
|
||||
|
||||
### Enabling the Powerline look
|
||||
|
||||
|
@ -240,9 +244,6 @@ To make use of these symbols, there are several options:
|
|||
[powerline patched fonts]: https://github.com/powerline/fonts
|
||||
[powerline font]: https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
|
||||
[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.
|
||||
|
||||
Then edit your `~/.tmux.conf.local` copy (with `<prefix> e`) and adjust the
|
||||
following variables:
|
||||
|
@ -253,12 +254,16 @@ tmux_conf_theme_left_separator_sub='\uE0B1'
|
|||
tmux_conf_theme_right_separator_main='\uE0B2'
|
||||
tmux_conf_theme_right_separator_sub='\uE0B3'
|
||||
```
|
||||
|
||||
The [Powerline manual] contains further details on how to install fonts
|
||||
containing the Powerline symbols. You don't need to install Powerline itself
|
||||
though.
|
||||
|
||||
[Powerline manual]: http://powerline.readthedocs.org/en/latest/installation.html#fonts-installation
|
||||
|
||||
### Configuring the status line
|
||||
|
||||
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`.
|
||||
|
||||
Edit your `~/.tmux.conf.local` copy (`<prefix> e`) and adjust the
|
||||
Edit your `.local` configuration file copy (`<prefix> e`) and adjust the
|
||||
`tmux_conf_theme_status_left` and `tmux_conf_theme_status_right` variables to
|
||||
your own preferences.
|
||||
|
||||
|
@ -286,7 +291,7 @@ This configuration supports the following builtin variables:
|
|||
- `#{username_ssh}`: SSH aware username information, blank when not connected
|
||||
to a remote server through SSH/Mosh
|
||||
|
||||
Beside custom variables mentioned above, the `tmux_conf_theme_status_left` and
|
||||
Beside the variables mentioned above, the `tmux_conf_theme_status_left` and
|
||||
`tmux_conf_theme_status_right` variables support usual tmux syntax, e.g. using
|
||||
`#()` to call an external command that inserts weather information provided by
|
||||
[wttr.in]:
|
||||
|
@ -300,8 +305,8 @@ minutes whatever the value of `status-interval`.
|
|||
|
||||
[wttr.in]: https://github.com/chubin/wttr.in#one-line-output
|
||||
|
||||
💡 You can also define your own custom variables. See the sample
|
||||
`.tmux.conf.local` file for instructions.
|
||||
💡 You can also define your own custom variables by writing special functions,
|
||||
see the sample `.local` configuration file for instructions.
|
||||
|
||||
Finally, remember `tmux_conf_theme_status_left` and
|
||||
`tmux_conf_theme_status_right` end up being given to tmux as `status-left` and
|
||||
|
@ -310,7 +315,7 @@ character has a special meaning and needs to be escaped by doubling it, e.g.
|
|||
```
|
||||
tmux_conf_theme_status_right='#(echo foo %% bar)'
|
||||
```
|
||||
See `man 3 strftime`.
|
||||
See also `man 3 strftime`.
|
||||
|
||||
### Using TPM plugins
|
||||
|
||||
|
@ -320,16 +325,14 @@ This configuration now comes with built-in [TPM] support:
|
|||
`status-right`, you can use it in `tmux_conf_theme_status_left` and
|
||||
`tmux_conf_theme_status_right` variables, see instructions above 👆
|
||||
- ⚠️ do not add `set -g @plugin 'tmux-plugins/tpm'`
|
||||
- ⚠️ do not add `run '~/.tmux/plugins/tpm/tpm'` to `~/.tmux.conf` or your
|
||||
- `~/.tmux.conf.local` copy ← people who are used to alter
|
||||
`.tmux.conf` to add TPM support will have to adapt their configuration
|
||||
- ⛔️ do not add `run '~/.tmux/plugins/tpm/tpm'` to any configuration file
|
||||
|
||||
⚠️ The TPM bindings differ slightly from upstream:
|
||||
- installing plugins: `<prefix> + I`
|
||||
- uninstalling plugins: `<prefix> + Alt + u`
|
||||
- updating plugins: `<prefix> + u`
|
||||
|
||||
See `~/.tmux.conf.local` for instructions.
|
||||
See the sample `.local` configuration file for instructions.
|
||||
|
||||
[TPM]: https://github.com/tmux-plugins/tpm
|
||||
|
||||
|
|
Loading…
Reference in a new issue