commit 0d0c642cb930e7e63db450b200a50e11b2629ef8
parent fb3db89d1481cf2b191141dd17a3575b250d308c
Author: Louis Burda <quent.burda@gmail.com>
Date: Fri, 1 Jul 2022 18:35:47 +0200
Move patches to separate repo
Diffstat:
3 files changed, 0 insertions(+), 65 deletions(-)
diff --git a/README b/README
@@ -35,7 +35,3 @@ Requirements
------------
Xlib header files for setting root window property WM_NAME
-
-Todo
-----
-- add contrib patches for dwm (clickability, colors)
diff --git a/contrib/event.diff b/contrib/event.diff
@@ -1,39 +0,0 @@
---- wmsl.c
-+++ wmsl.c
-@@ -13,9 +13,10 @@
- #define OUTPUTMAX 256
- #define STATUSMAX 1024
-
--enum block_state {
-- IDLE,
-- READY
-+enum {
-+ IDLE = 0,
-+ READY = 1,
-+ EVENT = 2
- };
-
- struct block {
-@@ -69,8 +70,10 @@ signal_handler(int sig, siginfo_t *info, void *context)
- debug("received signal for block with id %i\n", block_id);
-
- for (i = 0; i < ARRSIZE(blocks); i++) {
-- if (blocks[i].id == block_id) {
-+ if (blocks[i].id == abs(block_id)) {
- blocks[i].flags |= READY;
-+ if (block_id < 0)
-+ blocks[i].flags |= EVENT;
- break;
- }
- }
-@@ -104,6 +107,10 @@ update_blocks(void)
- if ((blocks[i].flags & READY) ||
- blocks[i].sleep_max && blocks[i].sleep_left <= 0.2) {
- blocks[i].sleep_left = blocks[i].sleep_max;
-+ if (blocks[i].flags & EVENT)
-+ setenv("WMSLEVENT", "1", 1);
-+ else
-+ unsetenv("WMSLEVENT");
- blocks[i].flags = IDLE;
-
- /* get command output */
diff --git a/contrib/prefix-suffix.diff b/contrib/prefix-suffix.diff
@@ -1,22 +0,0 @@
---- wmsl.c
-+++ wmsl.c
-@@ -22,6 +22,7 @@ struct block {
- const char *command;
- unsigned int id, sleep_max;
- int flags;
-+ const char *prefix, *suffix;
- float sleep_left;
- char output[OUTPUTMAX];
- };
-@@ -135,7 +136,11 @@ update_blocks(void)
- if (output_len) {
- if (status_len > 0)
- concat_status(delim, ARRSIZE(delim) - 1);
-+ if (blocks[i].prefix)
-+ concat_status(blocks[i].prefix, strlen(blocks[i].prefix));
- concat_status(blocks[i].output, output_len);
-+ if (blocks[i].suffix)
-+ concat_status(blocks[i].suffix, strlen(blocks[i].suffix));
- }
- }
- if (!update) return;