Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions conf.d/hydro.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 9 additions & 9 deletions functions/fish_mode_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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