eww: [BUG] Eww spawns zombie windows and processes
Checklist before submitting an issue
- I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
- I have specifically verified that this bug is not a common user error
- I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)
Describe the bug
Basically, launching widgets will open your widgets, but sometimes they’ll spawn, but refuse to close. Trying eww kill will kill the daemon, but these windows will not be closed. killall eww, however, works.
As far as I can predict, this issue happens after making eww daemon not a dependency for launching eww widgets. I’m not quite sure though.
Reproducing the issue
Use any config and create a widget. Bind the opening of your window to a keybind. Do not launch eww daemon. Press your keybind. Eww will not open windows immediately which is expected.
Now, before eww has finished opening the window, press the keybind again. Try to close this window with the eww close command. It will not work. The only way to remove the window will be killall eww.
This also happens sometimes randomly even when the daemon is running, but I cannot consistently reproduce it.
Expected behaviour
Eww windows to close with the eww close or eww kill commands.
Additional context
Logs:

The log says Closing all windows. However, windows aren’t closed.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 18 (12 by maintainers)
well, option 2 is what we had before - it made usage a lot more confusing, and generally more anoying to deal with when developing, too. Having a better check such as a file based lock would work, however it runs the issue of not getting cleaned up correctly - some people do do
pkill eww, which then, well, doesn’t necessarily give eww the chance to clean up everything.If you care about the startup speed, then do start the daemon manually before, just as you showed - there the daemon won’t do it’s 5 connection attempts, and thus will be a lot faster to start up.
Having some better way of making sure no current server is already running is definitely something worth looking at again - having multiple eww instances running from the same config path is definitely an issue that shouldn’t happen