|
| 1 | +# Tmux Mode Indicator |
| 2 | + |
| 3 | +Plugin that displays prompt indicating currently active Tmux mode. |
| 4 | + |
| 5 | +_This is a trimmed down version of the original [tmux-prefix-highlight](https://github.com/tmux-plugins/tmux-prefix-highlight) plugin._ |
| 6 | + |
| 7 | +## Usage |
| 8 | + |
| 9 | +Add `#{tmux_mode_indicator}` to the `status-left` or `status-right` option of Tmux. For example: |
| 10 | + |
| 11 | +```conf |
| 12 | +set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}' |
| 13 | +``` |
| 14 | + |
| 15 | +## Installation |
| 16 | + |
| 17 | +### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) |
| 18 | + |
| 19 | +Add this repository as a TPM plugin in your `.tmux.conf` file: |
| 20 | + |
| 21 | +```conf |
| 22 | +set -g @plugin 'MunifTanjim/tmux-mode-indicator' |
| 23 | +``` |
| 24 | + |
| 25 | +Press `prefix + I` in Tmux environment to install it. |
| 26 | + |
| 27 | +### Manual Installation |
| 28 | + |
| 29 | +Clone this repository: |
| 30 | + |
| 31 | +```bash |
| 32 | +git clone https://github.com/MunifTanjim/tmux-mode-indicator.git ~/.tmux/plugins/tmux-mode-indicator |
| 33 | +``` |
| 34 | + |
| 35 | +Add this line in your `.tmux.conf` file: |
| 36 | + |
| 37 | +```conf |
| 38 | +run-shell ~/.tmux/plugins/tmux-mode-indicator/mode_indicator.tmux |
| 39 | +``` |
| 40 | + |
| 41 | +Reload Tmux configuration file with: |
| 42 | + |
| 43 | +```sh |
| 44 | +tmux source-file ~/.tmux.conf |
| 45 | +``` |
| 46 | + |
| 47 | +## Configuration Options |
| 48 | + |
| 49 | +The following configuration options are available: |
| 50 | + |
| 51 | +```ini |
| 52 | +# prompt to display when tmux prefix key is pressed |
| 53 | +set -g @mode_indicator_prefix_prompt ' WAIT ' |
| 54 | + |
| 55 | +# prompt to display when tmux is in copy mode |
| 56 | +set -g @mode_indicator_copy_prompt ' COPY ' |
| 57 | + |
| 58 | +# prompt to display when tmux has synchronized panes |
| 59 | +set -g @mode_indicator_sync_prompt ' SYNC ' |
| 60 | + |
| 61 | +# prompt to display when tmux is in normal mode |
| 62 | +set -g @mode_indicator_empty_prompt ' TMUX ' |
| 63 | + |
| 64 | +# style values for prefix prompt |
| 65 | +set -g @mode_indicator_prefix_mode_style 'bg=blue,fg=black' |
| 66 | + |
| 67 | +# style values for copy prompt |
| 68 | +set -g @mode_indicator_copy_mode_style 'bg=yellow,fg=black' |
| 69 | + |
| 70 | +# style values for sync prompt |
| 71 | +set -g @mode_indicator_sync_mode_style 'bg=red,fg=black' |
| 72 | + |
| 73 | +# style values for empty prompt |
| 74 | +set -g @mode_indicator_empty_mode_style 'bg=cyan,fg=black' |
| 75 | +``` |
| 76 | + |
| 77 | +## License |
| 78 | + |
| 79 | +Licensed under the MIT License. Check the [LICENSE](./LICENSE) file for details. |
0 commit comments