summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornikolaus <nikolaus@fishbox.fritz.box>2022-09-07 13:59:22 +0200
committernikolaus <nikolaus@fishbox.fritz.box>2022-09-07 13:59:22 +0200
commit566442a0c023b2f07b9ade411d54870998564641 (patch)
treedc6a725b5334f41089b9519430bd9d90e0e1c7ee
parenta933ce0d6109524b393feb3e7156cbf0de88b42c (diff)
Initial commit and full program.HEADmaster
-rwxr-xr-x[-rw-r--r--]LICENSE0
-rwxr-xr-x[-rw-r--r--]Makefile4
-rwxr-xr-x[-rw-r--r--]README.md0
-rwxr-xr-x[-rw-r--r--]blocks.def.h0
-rwxr-xr-xblocks.h14
-rwxr-xr-xdwmblocksbin0 -> 12392 bytes
-rwxr-xr-x[-rw-r--r--]dwmblocks.c10
7 files changed, 23 insertions, 5 deletions
diff --git a/LICENSE b/LICENSE
index 3ec2656..3ec2656 100644..100755
--- a/LICENSE
+++ b/LICENSE
diff --git a/Makefile b/Makefile
index 75109ac..c440700 100644..100755
--- a/Makefile
+++ b/Makefile
@@ -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
new file mode 100755
index 0000000..631bc7a
--- /dev/null
+++ b/dwmblocks
Binary files differ
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++) {