-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrootblocks.h
More file actions
37 lines (31 loc) · 758 Bytes
/
rootblocks.h
File metadata and controls
37 lines (31 loc) · 758 Bytes
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
#ifndef ROOTBLOCKS_H_
#define SIGPLUS SIGRTMIN
#define SIGMINUS SIGRTMIN
#define LENGTH(X) (sizeof(X) / sizeof(X[0]))
#define MIN(a, b) ((a < b) ? a : b)
typedef struct {
char* command;
unsigned int interval;
unsigned int signal;
char* sub;
} Block;
void dummysighandler(int num);
void getcmds(int time);
void getsigcmds(unsigned int signal);
void setupsighandler();
void sighandler(int signum);
int statusupd(char* str, char* last);
void statusloop();
void termhandler();
void pstdout();
#ifndef NO_X
void setroot();
static void (*writestatus)() = setroot;
static int setupX();
static Display* dpy;
static int screen;
static Window root;
#else
static void (*writestatus)() = pstdout;
#endif
#endif // ROOTBLOCKS_H_