ss7m / paleofetch

neofetch, but written in C
MIT License
167 stars 50 forks source link

Add configurable way to replace strings of CPU and GPU name #41

Closed dwzg closed 4 years ago

dwzg commented 4 years ago

This adds a easy configurable way to replace substrings in CPU and GPU model with a different string. There is currently no check if the model name string can fit the new substring, so it can be dangerous if a big substring is inserted.

dwzg commented 4 years ago

I added a check to replace_substring() which will now terminate with an error if the new string will be too big. Any feedback about this replace feature?

ss7m commented 4 years ago

I like this- seems like a good way to post-process cpu and gpu names without having to hard code in anything too laborious. If you wouldn't mind adding to README explaining how to do this, I'll merge it.