Move 'Block' struct to header file

master
Hektor Misplon 2022-05-12 09:07:35 +02:00
parent c0fe3f2337
commit be66a10a0a
3 changed files with 8 additions and 8 deletions

View File

@ -0,0 +1,6 @@
typedef struct {
char* icon;
char* command;
unsigned int interval;
unsigned int signal;
} Block;

View File

@ -1,4 +1,5 @@
//Modify this file to change what commands output to your statusbar, and recompile using the make command. #include "block.h"
static const Block blocks[] = { static const Block blocks[] = {
/* /*
* Icon * Icon

View File

@ -18,12 +18,6 @@
#define MIN( a, b ) ( ( a < b) ? a : b ) #define MIN( a, b ) ( ( a < b) ? a : b )
#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1) #define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1)
typedef struct {
char* icon;
char* command;
unsigned int interval;
unsigned int signal;
} Block;
#ifndef __OpenBSD__ #ifndef __OpenBSD__
void dummysighandler(int num); void dummysighandler(int num);
#endif #endif
@ -47,7 +41,6 @@ static Window root;
static void (*writestatus) () = pstdout; static void (*writestatus) () = pstdout;
#endif #endif
#include "blocks.h" #include "blocks.h"
static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0}; static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};