Taskw: Also kill proc related to the stopped task

This commit is contained in:
gardouille 2021-10-12 09:46:47 +02:00
parent 0f34b99451
commit 0b627cc192
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,12 @@ display_current_task() { # {{{
## If no task was selected (empty var) then exit
[ -z "${TITLE}" ] && echo "Cancelled." && exit 0
## Kill any pomodorrior process running for the current task
pkill --full -- "${TITLE}"
## Also kill any "sleep 60" remaining process
pkill --full -- "sleep 60"
## Stop the selected task and exit
task "${TITLE}" stop >/dev/null && exit 0
}