From d8b31c6d34de59a1f1e26cc1860a312ddd08262d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 12 Nov 2021 19:47:54 +0300 Subject: done: task changed report output I changed done --- .local/bin/done | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '.local/bin/done') diff --git a/.local/bin/done b/.local/bin/done index ae76287..950541c 100755 --- a/.local/bin/done +++ b/.local/bin/done @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # we `start` tasks through taskwarrior which uses a hook to start them in # timewarrior @@ -7,11 +7,10 @@ function say_cancel { notify-send "cancelling, no action taken" "" --app-name="d if ACTIVE_TASK=$(task active); then - task_id=$(echo "${ACTIVE_TASK}" | head -n4 | tail -n1 | cut -d' ' -f1) + task_id=$(task active_task_id | xargs | cut -d' ' -f3) task_description=$(echo "${ACTIVE_TASK}" | head -n4 | tail -n1 | cut -d' ' -f2-) if choice=$(printf "done\npause" | rofi -dmenu -p "${task_description}" -lines 2 -no-custom); then - if [[ ${choice} == "done" ]]; then task "done" "${task_id}" notify-send "👏👏👏 good work there" "task ${task_description} is complete" --app-name="done" --icon="checkmark" -- cgit v1.2.3-70-g09d2