Awesome
Tmux Mode Indicator
Plugin that displays prompt indicating currently active Tmux mode.
Prefix Prompt:
Copy Prompt:
Sync Prompt:
Empty Prompt:
Note: This is a trimmed down version of the original tmux-prefix-highlight plugin.
Usage
Add #{tmux_mode_indicator}
to the status-left
or status-right
option of Tmux. For example:
set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}'
Installation
Installation with Tmux Plugin Manager
Add this repository as a TPM plugin in your .tmux.conf
file:
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
Press prefix + I
in Tmux environment to install it.
Manual Installation
Clone this repository:
git clone https://github.com/MunifTanjim/tmux-mode-indicator.git ~/.tmux/plugins/tmux-mode-indicator
Add this line in your .tmux.conf
file:
run-shell ~/.tmux/plugins/tmux-mode-indicator/mode_indicator.tmux
Reload Tmux configuration file with:
tmux source-file ~/.tmux.conf
Configuration Options
The following configuration options are available:
# prompt to display when tmux prefix key is pressed
set -g @mode_indicator_prefix_prompt ' WAIT '
# prompt to display when tmux is in copy mode
set -g @mode_indicator_copy_prompt ' COPY '
# prompt to display when tmux has synchronized panes
set -g @mode_indicator_sync_prompt ' SYNC '
# prompt to display when tmux is in normal mode
set -g @mode_indicator_empty_prompt ' TMUX '
# style values for prefix prompt
set -g @mode_indicator_prefix_mode_style 'bg=blue,fg=black'
# style values for copy prompt
set -g @mode_indicator_copy_mode_style 'bg=yellow,fg=black'
# style values for sync prompt
set -g @mode_indicator_sync_mode_style 'bg=red,fg=black'
# style values for empty prompt
set -g @mode_indicator_empty_mode_style 'bg=cyan,fg=black'
Custom Indicator
You can override the indicator at any time by setting these options:
# prompt to display instead of default mode indicators
set @mode_indicator_custom_prompt ' ---- '
# style values for custom prompt
set @mode_indicator_custom_mode_style 'default'
To revert back to the default mode indicators, unset those options:
set -u @mode_indicator_custom_prompt
set -u @mode_indicator_custom_mode_style
License
Licensed under the MIT License. Check the LICENSE file for details.