aboutsummaryrefslogtreecommitdiff
path: root/src/cfetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cfetch.c')
-rw-r--r--src/cfetch.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/cfetch.c b/src/cfetch.c
index ac5c6a6..3977bb1 100644
--- a/src/cfetch.c
+++ b/src/cfetch.c
@@ -7,32 +7,24 @@
* (at your option) any later version.
*/
-#include "modules/os/os.h"
-#include "modules/memory/memory.h"
-#include "modules/cpu/cpu.h"
-#include "logo/logo.h"
-#include "modules/utils/utils.h"
+#include "../include/cfetch.h"
-#include <stdio.h>
-#include <sys/ioctl.h>
-#include <stdlib.h>
#include <unistd.h>
+#include <stddef.h>
-int main(void) {
- os();
- memory();
- cpu();
- print_logo();
- struct winsize w;
- ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
+int main(void) {
- printf("lines %d\n", w.ws_row);
- printf("columns %d\n", w.ws_col);
+ system_info_t info = { 0 };
+ // set default artwork
+ int art_logo = 0;
- /* char *s = concat("derp", "herp");
- printf("%s\n", s);
- free(s); */
+ // set systeminformation
+ // use // to uncomment or comment
+ get_os(&info);
+ get_memory(&info);
+ get_cpu(&info);
+ print_ascii_art(&info, art_logo);
return 0;
}