Skip to content

Commit 79f1f25

Browse files
authored
feat: add screenfetch (#22)
1 parent d5979ac commit 79f1f25

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

.cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"neofetch",
66
"onefetch",
77
"pfetch",
8-
"uwufetch"
8+
"uwufetch",
9+
"screenfetch"
910
]
1011
}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $ fetchfetch
1515
| | onefetch: 2.22.0
1616
| | pfetch: Not installed
1717
| | UwUfetch: Not installed
18-
| |
18+
| | screenFetch: 3.9.1
1919
| |
2020
|______________________________________|
2121
```
@@ -27,12 +27,14 @@ $ fetchfetch
2727
* [onefetch][onefetch]
2828
* [pfetch][pfetch]
2929
* [UwUfetch][uwufetch]
30+
* [screenFetch][screenfetch]
3031

3132
[fastfetch]: https://github.com/fastfetch-cli/fastfetch
3233
[neofetch]: https://github.com/dylanaraps/neofetch
3334
[onefetch]: https://github.com/o2sh/onefetch
3435
[pfetch]: https://github.com/dylanaraps/pfetch
3536
[uwufetch]: https://github.com/ad-oliviero/uwufetch
37+
[screenfetch]: https://github.com/KittyKatt/screenFetch
3638

3739
## Installation
3840

src/stats.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ char *uwufetch() {
114114
return extract_named_version(out, "UwUfetch version ");
115115
}
116116

117+
char *screenfetch() {
118+
// NOTE Version in the format "screenFetch - Version x.x.x"
119+
char *out = app_version("screenfetch --version");
120+
return extract_named_version(out, "screenFetch - Version ");
121+
}
122+
117123
FetchStat *get_stats() {
118124
FetchStat *stats = malloc(STATS_SIZE * sizeof(FetchStat));
119125
stats[0].label = "Fastfetch";
@@ -128,5 +134,7 @@ FetchStat *get_stats() {
128134
stats[4].version = pfetch();
129135
stats[5].label = "UwUfetch";
130136
stats[5].version = uwufetch();
137+
stats[6].label = "screenFetch";
138+
stats[6].version = screenfetch();
131139
return stats;
132140
}

src/stats.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ char *pfetch();
4646
*/
4747
char *uwufetch();
4848

49-
#define STATS_SIZE 6
49+
/**
50+
* Gets screenFetch version information.
51+
*/
52+
char *screenfetch();
53+
54+
#define STATS_SIZE 7
5055
/**
5156
* Gets all stats.
5257
*/

0 commit comments

Comments
 (0)