diff options
author | Squibid <me@zacharyscheiman.com> | 2024-04-28 00:34:01 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2024-05-23 17:16:38 -0400 |
commit | d33de07040ad3b81ae8b07148b350cc05274eb06 (patch) | |
tree | 6746bd9a08b957a193551c2b4c948f01a7308a4b | |
parent | ba14867b037581865a08b353e5d05d208dbf1cc4 (diff) | |
download | wiz-1.0.tar.gz wiz-1.0.tar.bz2 wiz-1.0.zip |
Add nozombies optionv1.0
Diffstat (limited to '')
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | config.def.h | 2 | ||||
-rw-r--r-- | wiz.c | 4 |
4 files changed, 14 insertions, 4 deletions
@@ -1,5 +1,5 @@ PKG_CONFIG = pkg-config -VERSION = 0.1 +VERSION = 1.0 # flags and incs PKGS = wayland-client wayland-server @@ -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 */ @@ -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); |