update: dwmblocks icons; add: correct versions

This commit is contained in:
odweta
2026-05-26 14:35:28 +02:00
parent a9855f8d3e
commit 67d2dcc3b5
29 changed files with 255 additions and 2700 deletions
+9 -2
View File
@@ -17,6 +17,7 @@
#define CMDLENGTH 50
#define MIN( a, b ) ( ( a < b) ? a : b )
#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1)
#define DWMBLOCKS_VERSION "1.0-odweta"
typedef struct {
char* icon;
@@ -53,7 +54,6 @@ static void (*writestatus) () = pstdout;
static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};
static char statusstr[2][STATUSLENGTH];
static int statusContinue = 1;
static int returnStatus = 0;
//opens process *cmd and stores output in *output
void getcmd(const Block *block, char *output)
@@ -190,10 +190,17 @@ void termhandler()
statusContinue = 0;
}
void version() {
printf("dwmblocks " DWMBLOCKS_VERSION "\n");
}
int main(int argc, char** argv)
{
for (int i = 0; i < argc; i++) {//Handle command line arguments
if (!strcmp("-d",argv[i]))
if (!strcmp("-v",argv[i])) {
version();
return 0;
} else if (!strcmp("-d",argv[i]))
strncpy(delim, argv[++i], delimLen);
else if (!strcmp("-p",argv[i]))
writestatus = pstdout;