Reorganize code and remove hack for empty block outputs

This commit is contained in:
Utkarsh Verma
2023-03-25 21:38:05 +05:30
parent f6a5fa6480
commit 8dd9bc6a7d
17 changed files with 531 additions and 362 deletions

19
inc/block.h Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#define _GNU_SOURCE
#include "config.h"
typedef struct {
const char *command;
const unsigned int interval;
const unsigned int signal;
int pipe[2];
char output[CMDLENGTH * 4 + 1];
} Block;
extern Block blocks[];
extern const unsigned short blockCount;
void execBlock(const Block *, const char *);
void execBlocks(unsigned int);
void updateBlock(Block *);