Add nozombies option
This commit is contained in:
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
PKG_CONFIG = pkg-config
|
PKG_CONFIG = pkg-config
|
||||||
VERSION = 0.1
|
VERSION = 1.0
|
||||||
|
|
||||||
# flags and incs
|
# flags and incs
|
||||||
PKGS = wayland-client wayland-server
|
PKGS = wayland-client wayland-server
|
||||||
|
10
README.md
10
README.md
@ -12,8 +12,14 @@ pkg-config (compile-time only)
|
|||||||
Install these (and their `-devel` versions if your distro has separate
|
Install these (and their `-devel` versions if your distro has separate
|
||||||
development packages) and run `make`.
|
development packages) and run `make`.
|
||||||
## Configuration
|
## Configuration
|
||||||
To change idle events modify `config.h`, and recompile. Additionally you can modify
|
To change idle events modify `config.h`, and recompile.
|
||||||
the `killchild` option to send SIGINTs to old children.
|
|
||||||
|
### 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
|
## Acknowledgements
|
||||||
This project would not have been possible without the following project(s):
|
This project would not have been possible without the following project(s):
|
||||||
- swaybg for showing how to implement the Idle Notify protocol
|
- swaybg for showing how to implement the Idle Notify protocol
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#define CMD(...) (char*[]){ __VA_ARGS__, NULL }
|
#define CMD(...) (char*[]){ __VA_ARGS__, NULL }
|
||||||
|
|
||||||
static const int killchild = 1; /* kill idle command on wake and vice versa */
|
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[] = {
|
struct Events events[] = {
|
||||||
/* idle time (ms) run on idle run on wake */
|
/* idle time (ms) run on idle run on wake */
|
||||||
|
4
wiz.c
4
wiz.c
@ -140,7 +140,9 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
wl_display_roundtrip(display);
|
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);
|
ext_idle_notifier_v1_destroy(notifier);
|
||||||
wl_registry_destroy(registry);
|
wl_registry_destroy(registry);
|
||||||
|
Reference in New Issue
Block a user