Move 'Block' struct to header file
This commit is contained in:
6
.suckless/dwmblocks/block.h
Normal file
6
.suckless/dwmblocks/block.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
typedef struct {
|
||||||
|
char* icon;
|
||||||
|
char* command;
|
||||||
|
unsigned int interval;
|
||||||
|
unsigned int signal;
|
||||||
|
} Block;
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|||||||
Reference in New Issue
Block a user