Open XelorR opened 7 months ago
Is this just static text, not dynamic (#37)? If that's the case, I don't see how it could pose a performance issue, so I am okay with it. 👍
Static. Not dynamic. Main idea is to keep it fast and simple but more flexible if someone wants to add icons, decorations or results of their own functions.
https://github.com/jorgebucaran/hydro/compare/main...XelorR:hydro:prefix_vars
Tried to implement but passing additional variable before git branch name (row 95 in hydro.fish) doesn't seem to work...
Experimenting with following settings
set --global hydro_color_prompt 94e2d5
set --global hydro_color_error f38ba8
set --global hydro_color_pwd b4befe
set --global hydro_color_git f9e2af
set --global hydro_color_duration 94e2d5
set --global hydro_multiline true
set --global hydro_prefix_beginning \n" "
set --global hydro_prefix_git " "
set --global hydro_prefix_pwd " "
set --global hydro_prefix_duration " "
Expecting something like this:
Beginning, pwd and duration seems to work as expected, git branch prefix pasted manually just for screenshot. Beginning can also be colored with new variable: hydro_color_beginning
Now it seems to work as expected, created the pr: #52
Now it seems to work as expected, created the pr: #52
Just want to say I've been using this for a short while now and it's working perfectly as far as I can tell (just hydro_color_beginning and hydro_prefix_beginning)
Good to know! Thanks 👍
It would be nice to have some "blank" variables which can be used to add user-defined functionality.
You can always add your functionality like this:
in your config.fish
But what if you want to add git branch icon? You can edit fish_prompt.fish or row 95 in hydro.fish, but it would be much better to just use specific variable for it.
I think following variables would be useful:
hydro_prompt_prefix hydro_prompt_suffix hydro_pwd_prefix hydro_pwd_suffix hydro_git_prefix hydro_git_suffix hydro_duration_prefix hydro_duration_suffix
Or maybe prefixes only are enough.
It can use existing colors for simplification. E.g. hydro_pwd_prefix could be colored by hydro_color_pwd.
It can be used to add icons or additional user-defined functionality.