[Feature Request] Color customization?
TheLastTeapot opened this issue · 13 comments
Is it possible to add color customization for all the elements? It looks really ugly with my terminal colors, but I need them the way they are for other things. Also, what font is used for the name above the art? It doesn't show up properly for me
Yes, it's a nice idea to add color customization! Thank you!
I won't be able to work on it anytime soon, sadly (I have other projects and deadlines with university 😢) but I like the idea and I'll keep this issue open with the feature request
label!
About the text used to display the constellations' names, they are written in the JSON files using full width unicode characters, you'll need a font that support those characters for them to be displayed correctly in your terminal (e.g. Menlo, Cascadia Code...)
Alright, Thank you!
Thanks to @su8 with PR #33 stars are now colored!
I'll still keep this issue open because I'd like to improve this feature further, implementing a parameter so that the user can manually select a color when launching starfetch, and maybe not only for the stars but for other things too (e.g. the text which now is printed as bold text maybe) :)
It's not that hard to implement it - https://gist.github.com/JBlond/2fea43a3049b38287e5e9cefc87b2124
Just declare several global variables either std::string or define them and add another cli flag such as -c
and test the input argv[2]
for the requested color if it matches the if / else if. I tried to colorize the rest parameters but the side pipes and underlying pipes are not colorized.
The lines that I added colorization are the following:
Added colorization befor the j and after them \033[0;0m
Lines 91 to 97 in 2a7f991
Waited 1 hour and implemented the feature by myself.
Thanks so much @su8! I don't know if you're aware, but it does only work when you specify a specific constellation.
The color by default is cyan if you don't specify one with the -c
option. If you run the program without specifying color and/or constellation it uses cyan color and some random constellation.
but if I run starfetch -c yellow,
it gives :Available colors are: black, white, cyan, magenta, yellow, red, blue
. It only works if I do :starfetch -c yellow -n sagittarius
, then it is yellow.
Thanks!