-
Notifications
You must be signed in to change notification settings - Fork 493
/
Copy pathflashfetch.c
59 lines (51 loc) · 1.44 KB
/
flashfetch.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include "fastfetch.h"
#include "common/init.h"
#include "modules/modules.h"
int main(void)
{
ffInitInstance(); //This also applies default configuration to instance.config
//Modify instance.config here
FFOptionsModules* const options = &instance.config.modules;
// ffPrepareCPUUsage();
// ffPreparePublicIp(&options->publicIP);
// ffPrepareWeather(&options->weather);
//Does things like starting detection threads, disabling line wrap, etc
ffStart();
//Printing
void* const modules[] = {
&options->title,
&options->separator,
&options->os,
&options->host,
&options->kernel,
&options->uptime,
&options->packages,
&options->shell,
&options->display,
&options->de,
&options->wm,
&options->wmTheme,
&options->theme,
&options->icons,
&options->font,
&options->cursor,
&options->terminal,
&options->terminalFont,
&options->cpu,
&options->gpu,
&options->memory,
&options->swap,
&options->disk,
&options->localIP,
&options->battery,
&options->powerAdapter,
&options->locale,
&options->break_,
&options->colors,
};
for (size_t i = 0; i < ARRAY_SIZE(modules); i++)
((const FFModuleBaseInfo*) modules[i])->printModule(modules[i]);
ffFinish();
ffDestroyInstance();
return 0;
}