-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
121 lines (112 loc) · 2.45 KB
/
config.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#include "types.h"
// Default order of info
enum INFO info_default[] = {
INFO_OS,
INFO_HOST,
INFO_KRNL,
INFO_SH,
INFO_PKGS,
INFO_UP,
INFO_MEM,
//INFO_CPU,
//INFO_GPU,
INFO_DONE
};
// Default theming, see https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797
char *THEME = "[39m"; // Default
const char *THEMER = "[0m"; // Reset
char *SEPERATOR = "\x1b[0m : ";
const char ESCAPE = '\x1B';
// Format of the date, see https://linux.die.net/man/3/strftime
#define DATE_FORMAT "%a %Y %m %d %H:%M.%S"
// PCI
#define L_PCI "libpci.so.3"
#ifndef PCI
#define PCI PCI_FULL // use libpci (requires libpci)
// #define PCI PCI_DL // use libdl to load in libpci if available (requires libdl)
// #define PCI PCI_NONE // disable libpci (default)
#endif
// Localization
#define PKG_PACMAN "pacman"
#define PKG_DKPG "dkpg"
#define INFO_NAME_OS " OS"
#define INFO_NAME_HOST " Host"
#define INFO_NAME_KRNL " Kernel"
#define INFO_NAME_SH " Shell"
#define INFO_NAME_PKGS "Packages"
#define INFO_NAME_UP " Uptime"
#define INFO_NAME_TIME " Time"
#define INFO_NAME_MEM " MEM"
#define INFO_NAME_CPU " CPU"
#define INFO_NAME_GPU " GPU"
// Info Location
#define L_PRODUCTNAME "/sys/devices/virtual/dmi/id/product_name"
#define L_PRODUCTVER "/sys/devices/virtual/dmi/id/product_version"
#define L_RELEASE "/etc/os-release"
#define L_CPUINFO "/proc/cpuinfo"
// Distro Info
struct {
const char *name;
const char *theme;
const ASCII ascii;
} distroinfo[] = { {
"Linux",
"[39m",
{ {
" ___ ",
" (.. | ",
" (<> | ",
" / __ \\ ",
" ( / \\ /| ",
" _/ \\__)/_) ",
" \\/\\____\\/ ",
} }
}, {
"Arch Linux",
"[38;2;23;147;209m",
{ {
" /\\ ",
" / \\ ",
" /\\ \\ ",
" / \\ ",
" / ,, \\ ",
" / | | -\\ ",
"/_-'' ''-_\\",
} }
}, {
"Alpine Linux",
"[38;2;187;205;223m",
{ {
" /\\ /\\ ",
" / \\ \\ ",
" /| \\ \\ ",
" / | \\ \\ ",
" /\\_| \\ \\",
" ",
" "
} }
}, {
"Ubuntu",
"[38;2;233;84;32m",
{ {
" _ ",
" ---(_) ",
" _/ --- \\ ",
" (_) | | | ",
" \\ --- _/ ",
" ---(_) ",
" ",
} }
}, {
"Fedora",
"[38;2;11;87;164m",
{ {
" ",
" ,'''. ",
" | .,' ",
" ,..| |.. ",
" .' _;| ..' ",
" | '_,' | ",
" '.__.'` ",
} }
}, };