Closed allisio closed 4 years ago
Awesome! This is great for when other operating systems than Arch Linux will be added.
Oh wow I'm sorry I just saw this, since I just made a commit which would require a big rewrite of this. This is really good though, and pretty much exactly what I was imagining configuration for this project would look like.
Sorry about that. Accidentally pushed a different pull request to this one.
Should I close this request then? I saw the changes you made to get_terminal and I really like them. Since XOpenDisplay is now being called in get_terminal
and get_resolution
, I think you should move the display to be a global alongside uname_info
and my_sysinfo
, that way we only have to open and close (and do error checking) once.
This patch adds suckless-style configuration to paleofetch, enabling the user to decide which aspects of their system are displayed.
The "config file" is just an array of structs whose components are a label and a function to be called to get the value for that label. It currently lives in
main()
, but this could be extracted to a header file if deemed more appropriate.In addition, the data is vertically centered to account for the user having fewer configured labels than there are lines in the logo. This "fails" in the event that the user has more labels than logo lines, but that would at present require having duplicates, which is really more a case of operator error.