Skip to content

Commit 1ab550d

Browse files
committed
use local options for custom indicator
1 parent 253df37 commit 1ab550d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,22 @@ set -g @mode_indicator_empty_mode_style 'bg=cyan,fg=black'
8888

8989
### Custom Indicator
9090

91-
You can override the indicator at any time by setting these variables:
91+
You can override the indicator at any time by setting these options:
9292

9393
```ini
9494
# prompt to display instead of default mode indicators
95-
set -g @mode_indicator_custom_prompt ' ---- '
95+
set @mode_indicator_custom_prompt ' ---- '
9696

9797
# style values for custom prompt
98-
set -g @mode_indicator_custom_mode_style 'default'
98+
set @mode_indicator_custom_mode_style 'default'
9999
```
100100

101-
To revert back to the default mode indicators, unset those variables:
101+
To revert back to the default mode indicators, unset those options:
102102

103103
```ini
104-
set -gu @mode_indicator_custom_prompt
104+
set -u @mode_indicator_custom_prompt
105105

106-
set -gu @mode_indicator_custom_mode_style
106+
set -u @mode_indicator_custom_mode_style
107107
```
108108

109109
## License

mode_indicator.tmux

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ init_tmux_mode_indicator() {
3838
empty_style=$(indicator_style "$empty_mode_style_config" "bg=cyan,fg=black")
3939

4040
local -r \
41-
custom_prompt="#(tmux show-option -gqv $custom_prompt_config)" \
42-
custom_style="#(tmux show-option -gqv $custom_mode_style_config)"
41+
custom_prompt="#(tmux show-option -t #S -qv $custom_prompt_config)" \
42+
custom_style="#(tmux show-option -t #S -qv $custom_mode_style_config)"
4343

4444
local -r \
4545
mode_prompt="#{?#{!=:$custom_prompt,},$custom_prompt,#{?client_prefix,$prefix_prompt,#{?pane_in_mode,$copy_prompt,#{?pane_synchronized,$sync_prompt,$empty_prompt}}}}" \

0 commit comments

Comments
 (0)