mirror of
https://github.com/polybar/polybar.git
synced 2025-02-17 15:55:20 -05:00
feat(core): Add terminate script
This commit is contained in:
parent
3cc160b6ac
commit
57a9027f30
1 changed files with 17 additions and 0 deletions
17
scripts/lemonbuddy_terminate.sh
Executable file
17
scripts/lemonbuddy_terminate.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
read -p "Send SIGKILL to terminate processes? [Y/n] " -r choice
|
||||
|
||||
[[ "${choice^^}" == "Y" ]] || {
|
||||
echo "Aborting..."
|
||||
exit
|
||||
}
|
||||
|
||||
[[ "${choice^^}" == "Y" ]] && {
|
||||
pgrep -f "(lemonbuddy_wrapper.sh|^lemonb(uddy|ar))" | xargs kill -9 >/dev/null 2>&1
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "Kill signals successfully sent"
|
||||
else
|
||||
echo "Failed to send kill signal ($?)"
|
||||
fi
|
||||
}
|
Loading…
Add table
Reference in a new issue