Skip to content

Plugin that displays prompt indicating currently active Tmux mode.

License

Notifications You must be signed in to change notification settings

szageda/tmux-mode-indicator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tmux Mode Indicator

Plugin that displays prompt indicating currently active Tmux mode.

Prefix Prompt:
Prefix Prompt

Copy Prompt:
Copy Prompt

Sync Prompt:
Sync Prompt

Empty Prompt:
Empty Prompt vi-mode
vi-mode input

Empty Prompt Emacs
Emacs input

Note: This project was forked from https://github.com/MunifTanjim/tmux-mode-indicator

Usage

Add #{tmux_mode_indicator} to the status-left or status-right option of Tmux. For example:

set -g status-right "#{tmux_mode_indicator} #H"

Installation

Installation with Tmux Plugin Manager

Add this repository as a TPM plugin in your .tmux.conf file:

set -g @plugin "szageda/tmux-mode-indicator"

Press prefix + I in Tmux environment to install it.

Manual Installation

Clone this repository:

git clone https://github.com/szageda/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
# Note: The script performs logic to check for the input
# method (vi-mode or emacs). If this option is defined,
# the logic is overwritten.
set -g @mode_indicator_empty_prompt " TMUX "

# Style values for prefix prompt
set -g @mode_indicator_prefix_mode_style "bg=cyan,fg=white,bold"

# Style values for copy prompt
set -g @mode_indicator_copy_mode_style "bg=yellow,fg=black,bold"

# Style values for sync prompt
set -g @mode_indicator_sync_mode_style "bg=red,fg=black,bold"

# Style values for empty prompt
set -g @mode_indicator_empty_mode_style "bg=blue,fg=white,bold"

Troubleshooting

Error: Returned 126

'.../.tmux/plugins/tmux-mode-indicator/mode-indicator.tmux' returned 126

This error indicates executable permission is not set on mode-indicator.tmux. Make the plugin executable by using this command:

chmod +x ~/.tmux/plugins/tmux-mode-indicator/mode-indicator.tmux

License

Licensed under the MIT License. Check the LICENSE file for details.

About

Plugin that displays prompt indicating currently active Tmux mode.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%