Execute blocks asynchronously

This commit is contained in:
Utkarsh Verma 2021-04-17 15:47:40 +05:30
commit 968ceac7f3
No known key found for this signature in database
GPG key ID: 611291C16E1D6F95
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}};