diff --git a/README.md b/README.md index 6731b13..159d4d0 100644 --- a/README.md +++ b/README.md @@ -88,26 +88,34 @@ Modify variables using `set --universal` from the command line or `set --global` ### Symbols -| Variable | Type | Description | Default | -| ------------------------- | ------ | ------------------------------- | ------- | -| `hydro_symbol_start` | string | Prompt start symbol. | | -| `hydro_symbol_prompt` | string | Prompt symbol. | `❱` | -| `hydro_symbol_git_dirty` | string | Dirty repository symbol. | `•` | -| `hydro_symbol_git_ahead` | string | Ahead of your upstream symbol. | `↑` | -| `hydro_symbol_git_behind` | string | Behind of your upstream symbol. | `↓` | +| Variable | Type | Description | Default | +| ------------------------------ | ------ | ---------------------------------------- | ------- | +| `hydro_symbol_start` | string | Prompt start symbol. | | +| `hydro_symbol_prompt` | string | Prompt symbol. | `❱` | +| `hydro_symbol_git_dirty` | string | Dirty repository symbol. | `•` | +| `hydro_symbol_git_ahead` | string | Ahead of your upstream symbol. | `↑` | +| `hydro_symbol_git_behind` | string | Behind of your upstream symbol. | `↓` | +| `hydro_symbol_vi_mode_default` | string | Symbol of the vi default mode indicator. | `N` | +| `hydro_symbol_vi_mode_insert` | string | Symbol of the vi insert mode indicator. | `I` | +| `hydro_symbol_vi_mode_replace` | string | Symbol of the vi replace mode indicator. | `R` | +| `hydro_symbol_vi_mode_visual` | string | Symbol of the vi visual mode indicator. | `V` | ### Colors > Any argument accepted by [`set_color`](https://fishshell.com/docs/current/cmds/set_color.html). -| Variable | Type | Description | Default | -| ---------------------- | ----- | ------------------------------ | -------------------- | -| `hydro_color_pwd` | color | Color of the pwd segment. | `$fish_color_normal` | -| `hydro_color_git` | color | Color of the git segment. | `$fish_color_normal` | -| `hydro_color_start` | color | Color of the start symbol. | `$fish_color_normal` | -| `hydro_color_error` | color | Color of the error segment. | `$fish_color_error` | -| `hydro_color_prompt` | color | Color of the prompt symbol. | `$fish_color_normal` | -| `hydro_color_duration` | color | Color of the duration section. | `$fish_color_normal` | +| Variable | Type | Description | Default | +| ----------------------------- | ----- | --------------------------------------- | -------------------- | +| `hydro_color_pwd` | color | Color of the pwd segment. | `$fish_color_normal` | +| `hydro_color_git` | color | Color of the git segment. | `$fish_color_normal` | +| `hydro_color_start` | color | Color of the start symbol. | `$fish_color_normal` | +| `hydro_color_error` | color | Color of the error segment. | `$fish_color_error` | +| `hydro_color_prompt` | color | Color of the prompt symbol. | `$fish_color_normal` | +| `hydro_color_duration` | color | Color of the duration section. | `$fish_color_normal` | +| `hydro_color_vi_mode_default` | color | Color of the vi default mode indicator. | `$fish_color_normal` | +| `hydro_color_vi_mode_insert` | color | Color of the vi insert mode indicator. | `$fish_color_normal` | +| `hydro_color_vi_mode_replace` | color | Color of the vi replace mode indicator. | `$fish_color_normal` | +| `hydro_color_vi_mode_visual` | color | Color of the vi visual mode indicator. | `$fish_color_normal` | ### Flags diff --git a/conf.d/hydro.fish b/conf.d/hydro.fish index 39bf3a8..6d4f7e2 100644 --- a/conf.d/hydro.fish +++ b/conf.d/hydro.fish @@ -136,3 +136,7 @@ set --query hydro_symbol_git_ahead || set --global hydro_symbol_git_ahead ↑ set --query hydro_symbol_git_behind || set --global hydro_symbol_git_behind ↓ set --query hydro_multiline || set --global hydro_multiline false set --query hydro_cmd_duration_threshold || set --global hydro_cmd_duration_threshold 1000 +set --query hydro_symbol_vi_mode_default || set --global hydro_symbol_vi_mode_default N +set --query hydro_symbol_vi_mode_insert || set --global hydro_symbol_vi_mode_insert I +set --query hydro_symbol_vi_mode_replace || set --global hydro_symbol_vi_mode_replace R +set --query hydro_symbol_vi_mode_visual || set --global hydro_symbol_vi_mode_visual V diff --git a/functions/fish_mode_prompt.fish b/functions/fish_mode_prompt.fish index 2b6b28c..28e112f 100644 --- a/functions/fish_mode_prompt.fish +++ b/functions/fish_mode_prompt.fish @@ -4,18 +4,18 @@ function fish_mode_prompt set --local vi_mode_symbol switch $fish_bind_mode case default - set vi_mode_color (set_color $fish_color_selection) - set vi_mode_symbol N + set vi_mode_color (set_color $hydro_color_vi_mode_default) + set vi_mode_symbol $hydro_symbol_vi_mode_default case insert - set vi_mode_color (set_color $fish_color_selection) - set vi_mode_symbol I + set vi_mode_color (set_color $hydro_color_vi_mode_insert) + set vi_mode_symbol $hydro_symbol_vi_mode_insert case replace replace_one - set vi_mode_color (set_color $fish_color_match) - set vi_mode_symbol R + set vi_mode_color (set_color $hydro_color_vi_mode_replace) + set vi_mode_symbol $hydro_symbol_vi_mode_replace case visual - set vi_mode_color (set_color $fish_color_match) - set vi_mode_symbol V + set vi_mode_color (set_color $hydro_color_vi_mode_visual) + set vi_mode_symbol $hydro_symbol_vi_mode_visual end - echo -e "$vi_mode_color $vi_mode_symbol \x1b[0m " + echo -e "$vi_mode_color$vi_mode_symbol$(set_color normal) " end end