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 --- .config/task/taskrc##h.lowe | 6 ++++++ .local/bin/done | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.config/task/taskrc##h.lowe b/.config/task/taskrc##h.lowe index 003a2d5..b92a94d 100644 --- a/.config/task/taskrc##h.lowe +++ b/.config/task/taskrc##h.lowe @@ -78,6 +78,12 @@ report.active.description = Current task report.active.labels = ID,Description report.active.columns = id,description +### You cannot head/tail report output now, this will be better ssh calm down +report.active_task_id.description = ID of the active task +report.active_task_id.labels = X +report.active_task_id.columns = id +report.active_task_id.filter = +ACTIVE + calendar.details=full taskd.credentials=me\/yigit sever\/765df4a2-6c6c-408b-a266-17117e944f4e taskd.certificate=~/.local/share/task/lowe.cert.pem 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