mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-02 04:37:49 +02:00
* 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>
13 lines
300 B
Bash
Executable File
13 lines
300 B
Bash
Executable File
#!/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}'
|
|
done
|
|
else
|
|
echo '{"alt": "", "tooltip": ""}'
|
|
fi
|