kfetch/include/fetch.h

39 lines
922 B
C
Raw Normal View History

2023-11-02 14:51:10 +00:00
#ifndef _FUNCS_H
#define _FUNCS_H
#include <time.h>
#include <sys/utsname.h>
#if defined(CLOCK_BOOTTIME)
#define CLOCK CLOCK_BOOTTIME
#elif defined(CLOCK_UPTIME)
#define CLOCK CLOCK_UPTIME
#elif defined(__APPLE__)
#define CLOCK CLOCK_MONOTONIC
#endif
typedef struct {
char os_name[128];
struct utsname uts;
char *pkg_cmd;
char *color;
char *font_color;
size_t logo_size;
char **logo;
} FETCH;
FETCH Init(void);
int GetOs(char *os_name, size_t len);
void GetArt(FETCH *fetch);
void GetKernel(const char *title, const FETCH fetch);
void PrintOs(const char *title, const FETCH fetch);
void PrintColors(const char *title, const FETCH fetch);
void Blank(const char *title, const FETCH fetch);
2023-11-02 15:00:45 +00:00
void GetUser(const char *title, const FETCH fetch);
2023-11-02 15:19:43 +00:00
void GetUptime(const char *title, const FETCH fetch);
void GetArch(const char *title, const FETCH fetch);
void GetShell(const char *title, const FETCH fetch);
2023-11-02 14:51:10 +00:00
#endif