Files
fastfetch/src/flashfetch.c
T

59 lines
1.4 KiB
C
Raw Normal View History

2021-02-27 18:30:05 +01:00
#include "fastfetch.h"
2023-03-07 16:13:53 +08:00
#include "modules/modules.h"
2023-03-07 14:56:13 +08:00
int main(void)
2021-02-27 18:30:05 +01:00
{
ffInitInstance(); //This also applies default configuration to instance.config
2021-02-27 18:30:05 +01:00
2022-01-18 18:56:37 +01:00
//Modify instance.config here
2023-10-25 15:38:46 +08:00
FFOptionsModules* const options = &instance.config.modules;
2022-01-18 18:56:37 +01:00
2022-09-29 17:14:50 +08:00
// ffPrepareCPUUsage();
2023-10-25 15:38:46 +08:00
// ffPreparePublicIp(&options->publicIP);
// ffPrepareWeather(&options->weather);
2022-09-29 17:14:50 +08:00
2022-07-25 15:01:11 +02:00
//Does things like starting detection threads, disabling line wrap, etc
ffStart();
2021-06-17 13:49:25 +02:00
2021-02-27 18:30:05 +01:00
//Printing
2023-11-13 16:36:25 +08:00
void* const modules[] = {
&options->title,
&options->separator,
&options->os,
&options->host,
2023-11-13 16:36:25 +08:00
&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 < sizeof(modules) / sizeof(modules[0]); i++)
((const FFModuleBaseInfo*) modules[i])->printModule(modules[i]);
2021-02-27 18:30:05 +01:00
ffFinish();
ffDestroyInstance();
2021-02-27 18:30:05 +01:00
return 0;
2021-03-27 18:14:19 +01:00
}