Make BLOCK definition pedantic

This commit is contained in:
Utkarsh Verma 2022-01-02 23:47:27 +05:30
parent 97ec586b82
commit 978229b265
No known key found for this signature in database
GPG Key ID: 817656CF818EFCCC
3 changed files with 13 additions and 13 deletions

View File

@ -78,8 +78,8 @@ The syntax for defining a block is:
```c
const Block blocks[] = {
...
BLOCK("volume", 0, 5)
BLOCK("date", 1800, 1)
BLOCK("volume", 0, 5),
BLOCK("date", 1800, 1),
...
}
```

View File

@ -3,14 +3,14 @@
#define CLICKABLE_BLOCKS
const Block blocks[] = {
BLOCK("sb-mail", 1800, 17)
BLOCK("sb-music", 0, 18)
BLOCK("sb-disk", 1800, 19)
BLOCK("sb-memory", 10, 20)
BLOCK("sb-loadavg", 5, 21)
BLOCK("sb-mic", 0, 26)
BLOCK("sb-volume", 0, 22)
BLOCK("sb-battery", 5, 23)
BLOCK("sb-date", 1, 24)
// BLOCK("sb-network", 5, 25)
BLOCK("sb-mail", 1800, 17),
BLOCK("sb-music", 0, 18),
BLOCK("sb-disk", 1800, 19),
BLOCK("sb-memory", 10, 20),
BLOCK("sb-loadavg", 5, 21),
BLOCK("sb-mic", 0, 26),
BLOCK("sb-volume", 0, 22),
BLOCK("sb-battery", 5, 23),
BLOCK("sb-date", 1, 24),
// BLOCK("sb-network", 5, 25),
};

2
main.c
View File

@ -12,7 +12,7 @@
#define POLL_INTERVAL 50
#define LEN(arr) (sizeof(arr) / sizeof(arr[0]))
#define BLOCK(cmd, interval, signal) {"echo \"$(" cmd ")\"", interval, signal},
#define BLOCK(cmd, interval, signal) {"echo \"$(" cmd ")\"", interval, signal}
typedef struct {
const char* command;
const unsigned int interval;