aboutsummaryrefslogtreecommitdiff
path: root/include/cfetch.h
diff options
context:
space:
mode:
authorAnser <rostgans@tutamail.com>2026-08-11 00:18:57 +0200
committerAnser <rostgans@tutamail.com>2026-08-11 00:18:57 +0200
commiteb6f986361713d6ce47c6d4572bb24d9f6207ddf (patch)
tree3fca62d5cad785acce36a46a660219840c959932 /include/cfetch.h
parent9ad584b5762433f7c99d7cc7b65ad21ebe4ff932 (diff)
TOBESQUISHED: safe in reconstruction of the codes layout and rework of information handeling also ascii art printing
Diffstat (limited to 'include/cfetch.h')
-rw-r--r--include/cfetch.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/cfetch.h b/include/cfetch.h
new file mode 100644
index 0000000..57c8781
--- /dev/null
+++ b/include/cfetch.h
@@ -0,0 +1,44 @@
+#ifndef CFETCH_H
+#define CFETCH_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define MAX_ASCII_LINES 50
+#define MAX_ASCII_WIDTH 256
+
+
+/* System information structure */
+
+typedef struct system_info_t{
+ char user[64];
+ char kernel[64];
+ char memory[64];
+ char cpu[64];
+} system_info_t;
+
+typedef struct {
+ char lines[MAX_ASCII_LINES][MAX_ASCII_WIDTH];
+} ascii_art_t;
+
+typedef struct distro_mapping_t
+{
+ const char *distro_pattern;
+ const char *ascii_file;
+} distro_mapping_t;
+
+
+void print_ascii_art(system_info_t *info, int art);
+void get_cpu(system_info_t *info);
+void get_memory(system_info_t *info);
+void get_os(system_info_t *info);
+
+
+/* Util functions */
+char *string_format(char *string);
+char *concat(const char *str1, const char *str2);
+
+
+
+#endif /* CFETCH_H */