41 lines
992 B
C
41 lines
992 B
C
#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
|
|
|
|
#define OS_SIZE 128
|
|
typedef struct {
|
|
char os_name[OS_SIZE + 1];
|
|
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);
|
|
int GetKernel(const char *title, const FETCH fetch);
|
|
int PrintOs(const char *title, const FETCH fetch);
|
|
int PrintColors(const char *title, const FETCH fetch);
|
|
int Blank(const char *title, const FETCH fetch);
|
|
int GetUser(const char *title, const FETCH fetch);
|
|
int GetUptime(const char *title, const FETCH fetch);
|
|
int GetArch(const char *title, const FETCH fetch);
|
|
int GetShell(const char *title, const FETCH fetch);
|
|
int GetPkg(const char *title, const FETCH fetch);
|
|
|
|
#endif
|