diff options
-rwxr-xr-x[-rw-r--r--] | LICENSE | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | Makefile | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | README.md | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | blocks.def.h | 0 | ||||
-rwxr-xr-x | blocks.h | 14 | ||||
-rwxr-xr-x | dwmblocks | bin | 0 -> 12392 bytes | |||
-rwxr-xr-x[-rw-r--r--] | dwmblocks.c | 10 |
7 files changed, 23 insertions, 5 deletions
@@ -5,8 +5,8 @@ LDFLAGS := -lX11 # FreeBSD (uncomment) #LDFLAGS += -L/usr/local/lib -I/usr/local/include -# # OpenBSD (uncomment) -#LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include + # OpenBSD (uncomment) +LDFLAGS += -L/usr/X11R6/lib -I/usr/X11R6/include all: options dwmblocks diff --git a/README.md b/README.md index dda2259..dda2259 100644..100755 --- a/README.md +++ b/README.md diff --git a/blocks.def.h b/blocks.def.h index 9c22d68..9c22d68 100644..100755 --- a/blocks.def.h +++ b/blocks.def.h diff --git a/blocks.h b/blocks.h new file mode 100755 index 0000000..277e159 --- /dev/null +++ b/blocks.h @@ -0,0 +1,14 @@ +//Modify this file to change what commands output to your statusbar, and recompile using the make command. +static const Block blocks[] = { + /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ + {"", "volume.sh", 0, 1}, + {"📧", "mail.sh", 300, 0}, +/* {"Mem:", "memory.sh", 60, 0},*/ + {"", "cpu_temp.sh", 45, 0}, + {"", "battery.sh", 60, 0}, + {"", "date '+%d %b %I:%M'", 60, 30}, +}; + +//sets delimeter between status commands. NULL character ('\0') means no delimeter. +static char delim[] = " | "; +static unsigned int delimLen = 5; diff --git a/dwmblocks b/dwmblocks Binary files differnew file mode 100755 index 0000000..631bc7a --- /dev/null +++ b/dwmblocks diff --git a/dwmblocks.c b/dwmblocks.c index befd252..08f0b59 100644..100755 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -8,7 +8,7 @@ #endif #ifdef __OpenBSD__ #define SIGPLUS SIGUSR1+1 -#define SIGMINUS SIGUSR1-1 +#define SIGMINUS SIGINFO #else #define SIGPLUS SIGRTMIN #define SIGMINUS SIGRTMIN @@ -104,8 +104,12 @@ void setupsignals() { #ifndef __OpenBSD__ /* initialize all real time signals with dummy handler */ - for (int i = SIGRTMIN; i <= SIGRTMAX; i++) - signal(i, dummysighandler); +/* for (int i = SIGRTMIN; i <= SIGRTMAX; i++) */ +/* signal(i, dummysighandler); */ + for (unsigned int i = 0; i < LENGTH(blocks); i++) { + if (blocks[i].signal > 0) + signal(SIGRTMIN+blocks[i].signal, sighandler); + } #endif for (unsigned int i = 0; i < LENGTH(blocks); i++) { |