From 26ce0c203b6927963c3786c38fddaf19ef31cbda Mon Sep 17 00:00:00 2001 From: Matt Dembiczak Date: Thu, 20 Feb 2025 11:34:20 -0500 Subject: [PATCH 1/4] update `fish_mode_prompt.fish` to use `set_color normal` --- functions/fish_mode_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fish_mode_prompt.fish b/functions/fish_mode_prompt.fish index 2b6b28c..c96bc64 100644 --- a/functions/fish_mode_prompt.fish +++ b/functions/fish_mode_prompt.fish @@ -16,6 +16,6 @@ function fish_mode_prompt set vi_mode_color (set_color $fish_color_match) set vi_mode_symbol V end - echo -e "$vi_mode_color $vi_mode_symbol \x1b[0m " + echo -e "$vi_mode_color $vi_mode_symbol $(set_color normal) " end end From 5391abd66e676f2c52969735b40725a05cc0cf0b Mon Sep 17 00:00:00 2001 From: Matt Dembiczak Date: Sat, 22 Feb 2025 15:58:39 -0500 Subject: [PATCH 2/4] add `hydro_color_vi_mode_*` variables --- README.md | 20 ++++++++++++-------- functions/fish_mode_prompt.fish | 10 +++++----- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6731b13..a9d7aef 100644 --- a/README.md +++ b/README.md @@ -100,14 +100,18 @@ Modify variables using `set --universal` from the command line or `set --global` > 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/functions/fish_mode_prompt.fish b/functions/fish_mode_prompt.fish index c96bc64..87ed58b 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_color (set_color $hydro_color_vi_mode_default) set vi_mode_symbol N case insert - set vi_mode_color (set_color $fish_color_selection) + set vi_mode_color (set_color $hydro_color_vi_mode_insert) set vi_mode_symbol I case replace replace_one - set vi_mode_color (set_color $fish_color_match) + set vi_mode_color (set_color $hydro_color_vi_mode_replace) set vi_mode_symbol R case visual - set vi_mode_color (set_color $fish_color_match) + set vi_mode_color (set_color $hydro_color_vi_mode_visual) set vi_mode_symbol V end - echo -e "$vi_mode_color $vi_mode_symbol $(set_color normal) " + echo -e "$vi_mode_color$vi_mode_symbol$(set_color normal) " end end From b16b06641a82faf3cb094e3bce277cc398bd8d3b Mon Sep 17 00:00:00 2001 From: Matt Dembiczak Date: Sun, 2 Mar 2025 17:21:14 -0500 Subject: [PATCH 3/4] add `hydro_symbol_vi_mode_*` variables --- README.md | 18 +++++++++++------- conf.d/hydro.fish | 4 ++++ functions/fish_mode_prompt.fish | 8 ++++---- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a9d7aef..8b6099d 100644 --- a/README.md +++ b/README.md @@ -88,13 +88,17 @@ 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 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 87ed58b..28e112f 100644 --- a/functions/fish_mode_prompt.fish +++ b/functions/fish_mode_prompt.fish @@ -5,16 +5,16 @@ function fish_mode_prompt switch $fish_bind_mode case default set vi_mode_color (set_color $hydro_color_vi_mode_default) - set vi_mode_symbol N + set vi_mode_symbol $hydro_symbol_vi_mode_default case insert set vi_mode_color (set_color $hydro_color_vi_mode_insert) - set vi_mode_symbol I + set vi_mode_symbol $hydro_symbol_vi_mode_insert case replace replace_one set vi_mode_color (set_color $hydro_color_vi_mode_replace) - set vi_mode_symbol R + set vi_mode_symbol $hydro_symbol_vi_mode_replace case visual set vi_mode_color (set_color $hydro_color_vi_mode_visual) - set vi_mode_symbol V + set vi_mode_symbol $hydro_symbol_vi_mode_visual end echo -e "$vi_mode_color$vi_mode_symbol$(set_color normal) " end From 9b283f40ab9a7f7bce2b8eab71afa54c776e008f Mon Sep 17 00:00:00 2001 From: Matt Dembiczak Date: Sun, 2 Mar 2025 17:46:22 -0500 Subject: [PATCH 4/4] rename `VI` to `vi` --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8b6099d..159d4d0 100644 --- a/README.md +++ b/README.md @@ -95,10 +95,10 @@ Modify variables using `set --universal` from the command line or `set --global` | `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` | +| `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 @@ -112,10 +112,10 @@ Modify variables using `set --universal` from the command line or `set --global` | `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` | +| `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