Execute blocks asynchronously

This commit is contained in:
Utkarsh Verma
2021-04-17 15:47:40 +05:30
parent 62b67552e6
commit 968ceac7f3
3 changed files with 99 additions and 103 deletions

View File

@@ -1,7 +1,15 @@
#define CMDLENGTH 50
#define delimiter "  "
#define DELIMITER "  "
const Block blocks[] = {
typedef struct {
char* command;
unsigned int interval;
unsigned int signal;
char output[CMDLENGTH];
int pipe[2];
} Block;
static Block blocks[] = {
{"sb-mail", 1800, 1},
{"sb-music", 0, 2},
{"sb-disk", 1800, 4},
@@ -10,5 +18,4 @@ const Block blocks[] = {
{"sb-volume", 0, 5},
{"sb-battery", 5, 6},
{"sb-date", 20, 7},
{"sb-network", 5, 8},
};
{"sb-network", 5, 8}};