aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2024-04-28 00:34:01 -0400
committerSquibid <me@zacharyscheiman.com>2024-05-23 17:16:38 -0400
commitd33de07040ad3b81ae8b07148b350cc05274eb06 (patch)
tree6746bd9a08b957a193551c2b4c948f01a7308a4b
parentba14867b037581865a08b353e5d05d208dbf1cc4 (diff)
downloadwiz-1.0.tar.gz
wiz-1.0.tar.bz2
wiz-1.0.zip
Add nozombies optionv1.0
Diffstat (limited to '')
-rw-r--r--Makefile2
-rw-r--r--README.md10
-rw-r--r--config.def.h2
-rw-r--r--wiz.c4
4 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 16dfb04..31c7bf4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
PKG_CONFIG = pkg-config
-VERSION = 0.1
+VERSION = 1.0
# flags and incs
PKGS = wayland-client wayland-server
diff --git a/README.md b/README.md
index 556b5c1..70d7cf2 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,14 @@ pkg-config (compile-time only)
Install these (and their `-devel` versions if your distro has separate
development packages) and run `make`.
## Configuration
-To change idle events modify `config.h`, and recompile. Additionally you can modify
-the `killchild` option to send SIGINTs to old children.
+To change idle events modify `config.h`, and recompile.
+
+### Options
+`killchild`: send SIGINT to children on wake and vice versa.
+
+`nozombies`: removes all zombies, when disabled wiz tries to leave the last
+child as a zombie
+
## Acknowledgements
This project would not have been possible without the following project(s):
- swaybg for showing how to implement the Idle Notify protocol
diff --git a/config.def.h b/config.def.h
index 94aed91..a2c047c 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,6 +1,8 @@
#define CMD(...) (char*[]){ __VA_ARGS__, NULL }
static const int killchild = 1; /* kill idle command on wake and vice versa */
+static const int nozombies = 1; /* removes all zombies, when disabled wiz tries
+ to leave the last child as a zombie */
struct Events events[] = {
/* idle time (ms) run on idle run on wake */
diff --git a/wiz.c b/wiz.c
index 8f969bb..4dab49b 100644
--- a/wiz.c
+++ b/wiz.c
@@ -140,7 +140,9 @@ main(int argc, char *argv[])
}
wl_display_roundtrip(display);
- while (wl_display_dispatch(display) != -1);
+ while (wl_display_dispatch(display) != -1)
+ if (nozombies)
+ waitpid(-1, NULL, WUNTRACED);
ext_idle_notifier_v1_destroy(notifier);
wl_registry_destroy(registry);