aboutsummaryrefslogtreecommitdiff
path: root/src/cfetch.c
blob: ac5c6a6997631ae673c10688d3dd1b4fb9822e51 (plain) (blame)
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
/*  cfetch is my try to implement a neofetch/fastfetch/commiefetch clone in C.
*   Copyright (C) 2026  Anser <https://codeberg.org/Anser/cfetch>
*
*   This program is free software: you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation, either version 3 of the License, or
*   (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 <stdio.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <unistd.h>

int main(void) {
    os();
    memory();
    cpu();
    print_logo();

    struct winsize w;
    ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);

    printf("lines %d\n", w.ws_row);
    printf("columns %d\n", w.ws_col);

    /* char *s = concat("derp", "herp");
    printf("%s\n", s);
    free(s); */

    return 0;
}