Files
dotfiles/config/scripts/.local/scripts/quickshell-kill

19 lines
268 B
Bash
Executable File

#!/usr/bin/env bash
pid=$(pgrep -x quickshell)
[ -z "$pid" ] && exit 1
# for child in $(pgrep -P "$pid" 2>/dev/null); do
# kill "$child"
# done
children=$(pgrep -P "$pid" 2>/dev/null)
kill "$pid"
sleep 0.5
for child in $children; do
kill "$child" || true
done