these functions:
|
char* fastfetch() { |
|
// NOTE Version in the format "fastfetch x.x.x (ARCH)" |
|
char *out = app_version("fastfetch --version"); |
|
return extract_named_version(out, "fastfetch "); |
|
} |
|
|
|
char* neofetch() { |
|
// NOTE Version in the format "Neofetch x.x.x" |
|
char *out = app_version("neofetch --version"); |
|
return extract_named_version(out, "Neofetch "); |
|
} |
could be merged into one. like this:
FetchStat* get_stats() {
FetchStat *stats = malloc(STATS_SIZE * sizeof(FetchStat));
stats[0].label = "Fastfetch";
stats[0].version = get_version(/* command */ "fastfetch --version", /* prefix */ "fastfetch ");
return stats;
}
these functions:
fetchfetch/stats.c
Lines 82 to 92 in f684db4
could be merged into one. like this: