jorgebucaran / hydro

Ultra-pure, lag-free prompt with async Git status—just for Fish
MIT License
697 stars 53 forks source link

Prefix variables to add user defined static symbols #52

Closed XelorR closed 3 weeks ago

XelorR commented 9 months ago

51

Implemented following variables:

hydro_prefix_beginning hydro_prefix_git hydro_prefix_pwd hydro_prefix_duration

hydro_prefix_beginning can be colored with new introduced color variable: hydro_color_beginning

It is possible to add user-defined static text to prepend blocks, like this:

set --global hydro_multiline true

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_color_beginning 94e2d5

set --global hydro_prefix_beginning \n"$os_icon "
set --global hydro_prefix_git " "
set --global hydro_prefix_pwd " "
set --global hydro_prefix_duration "󰅐 "

Screenshot_20240123_235336

jorgebucaran commented 9 months ago

Thanks, @XelorR! 👀

XelorR commented 1 month ago

Hi @jorgebucaran, do you have any plans to merge?

Looks like there are no conflicts with base branch and no impact to performance. Also, if you just don't use new variables, everything stay as is.

Please let me know if you have any doubts, see some errors or need me to change something in my PR.

jorgebucaran commented 1 month ago

Not sure yet. Hydro is pretty minimal with some basic customization—what you see is what you get, which I like. I wanted something somewhat like Tide (which I recommend if you're into customization), but more lightweight, async capable like Tide, but without Powerline-style frills, and in as fewer files as possible. I'm still figuring out what I want in Hydro, but it shouldn't be an issue for you. Fisher lets you install and use your own version, so you don't need to wait on changes from me—it's just my personal prompt I'm sharing with the community.

XelorR commented 1 month ago

I see.

Honestly, there was a single purpose in adding this functionality - I wanted to add OS indicator, so I can see which system I am currently logged in. I have just generalized idea to make it more useful.

It is already implemented in Tide, but Tide seems too sophisticated for me. I love Hydro because it is simple and snappy and very straightforward to config.

I can proceed using my fork, but I don't see it like a big change which can affect performance or complexity. And it would be convenient to others who also like Hydro.

jorgebucaran commented 1 month ago

You're right, so let's just leave this open for now. You can go ahead and use your fork. No need to rush things.

It is already implemented in Tide, but Tide seems too sophisticated for me. I love Hydro because it is simple and snappy and very straightforward to config.

Thanks! Now, Tide's awesome, and I'd pick it over any other Fish prompt out there (even Starship, no contest). But Hydro fits my quirky style—almost like I'm seeing how much I can pack into as little code as possible.

jorgebucaran commented 1 month ago

Hey, could you simplify this to just two key variables? That way, I might be able to merge it. If not, we can just close it, and you can keep using your fork. And, we'll need docs too! :)

ybc37 commented 1 month ago

Thanks for Hydro and this PR!

Just some random observer's opinion: As someone who's using Hydro as multiline prompt, I'm very interested in the hydro_prefix_beginning variable, to be able to add a new line before the prompt. Would be great if this would be one of the key variables :D

jorgebucaran commented 1 month ago

Agreed. Let's stick with that one and the color one, renaming them to hydro_prefix_start and hydro_color_prefix. If we do end up adding another prefix later on, like hydro_prefix_git, the color can come from hydro_color_git, and we can keep that pattern going.