From be66a10a0a7c54288cafe3095ceb8084bce99919 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Thu, 12 May 2022 09:07:35 +0200 Subject: [PATCH] Move 'Block' struct to header file --- .suckless/dwmblocks/block.h | 6 ++++++ .suckless/dwmblocks/blocks.h | 3 ++- .suckless/dwmblocks/dwmblocks.c | 7 ------- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 .suckless/dwmblocks/block.h diff --git a/.suckless/dwmblocks/block.h b/.suckless/dwmblocks/block.h new file mode 100644 index 0000000..fdc000d --- /dev/null +++ b/.suckless/dwmblocks/block.h @@ -0,0 +1,6 @@ +typedef struct { + char* icon; + char* command; + unsigned int interval; + unsigned int signal; +} Block; diff --git a/.suckless/dwmblocks/blocks.h b/.suckless/dwmblocks/blocks.h index 90bb7ba..5bd42c0 100644 --- a/.suckless/dwmblocks/blocks.h +++ b/.suckless/dwmblocks/blocks.h @@ -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[] = { /* * Icon diff --git a/.suckless/dwmblocks/dwmblocks.c b/.suckless/dwmblocks/dwmblocks.c index 07c8064..5031515 100644 --- a/.suckless/dwmblocks/dwmblocks.c +++ b/.suckless/dwmblocks/dwmblocks.c @@ -18,12 +18,6 @@ #define MIN( a, b ) ( ( a < b) ? a : b ) #define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1) -typedef struct { - char* icon; - char* command; - unsigned int interval; - unsigned int signal; -} Block; #ifndef __OpenBSD__ void dummysighandler(int num); #endif @@ -47,7 +41,6 @@ static Window root; static void (*writestatus) () = pstdout; #endif - #include "blocks.h" static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};