Clean up orphaned voxtype status processes on exit (#5345)
* Clean up orphaned voxtype status processes on exit Waybar's custom/voxtype module runs omarchy-voxtype-status, which spawns a long-lived `voxtype status --follow` child. When Waybar reloads (config change, display hotplug, Hyprland reload), it kills the wrapper but the child survives as an orphan. Over time dozens accumulate. `trap 'kill 0' EXIT` signals the entire process group when the wrapper exits, ensuring the voxtype child is cleaned up. * Explain purpose of trap --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
co-authored by
David Heinemeier Hansson
parent
ac3c60228e
commit
37189368fb
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Clean up the voxtype --follow child when Waybar reloads
|
||||
trap 'kill 0' EXIT
|
||||
|
||||
if omarchy-cmd-present voxtype; then
|
||||
voxtype status --follow --extended --format json | while read -r line; do
|
||||
echo "$line" | jq -c '. + {alt: .class}'
|
||||
|
||||
Reference in New Issue
Block a user