Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nit: add BarStartEmpty and BarEndFilled theme characters #203

Closed
janpfeifer opened this issue Oct 3, 2024 · 6 comments
Closed

Nit: add BarStartEmpty and BarEndFilled theme characters #203

janpfeifer opened this issue Oct 3, 2024 · 6 comments

Comments

@janpfeifer
Copy link
Contributor

hi, and first many thanks for the wonderful package!

Recently I configured my progressbar as follows:

		progressbar.OptionSetTheme(progressbar.Theme{
			Saucer:        "[green]\uEE04[reset]", // 
			SaucerHead:    "[green]\uEE04[reset]", // 
			SaucerPadding: "[green]\uEE01[reset]", // 
			BarStart:      "[green]\uEE03[reset]", // 
			BarEnd:        "[green]\uEE02[reset]", // 
		}),

With the unicodes for progressbars (supported by all nerdfonts.com fonts), and I noticed that there is not way to make a distinction between the bar start/end filled or empty. The characters are as follows:

image

I was wondering if it would be possible to support those ?

cheers

@schollz
Copy link
Owner

schollz commented Oct 3, 2024

@janpfeifer great idea, would welcome the pr!

@janpfeifer
Copy link
Contributor Author

Done I think -- if u have a chance, pls check it out #204

I took the liberty of adding a couple of predefined Themes that the user can choose from if they want. It would be cool to have a more comprehensive selection at some point, I suppose ...

Here how it looks with the PR:

image

schollz added a commit that referenced this issue Oct 3, 2024
Added BarStartFilled and BarEndFille to Theme struct #203
schollz added a commit that referenced this issue Oct 3, 2024
@schollz
Copy link
Owner

schollz commented Oct 3, 2024

@janpfeifer this is so cool!!! what a huge improvement, I love how you incorporated them.

to get the nerdfonts working, which nerdfonts are needed? there seems to be a lot: https://www.nerdfonts.com/

@schollz
Copy link
Owner

schollz commented Oct 3, 2024

Nevermind! I got it - it's here: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/NerdFontsSymbolsOnly.zip

I'll make a little addition to the readme, this is so cool!

@janpfeifer
Copy link
Contributor Author

Thanks @schollz ! Yes, any of the nerd fonts will do. And Fira Code seems to have incorporated the symbols as well.

@janpfeifer
Copy link
Contributor Author

I just incorporated progressbar 3.16.1 into my project (still in a branch, but to be released soon), and it's working perfectly, thanks!

Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants