From 09abdbc57d3606adaa90f815a109af092024a1b5 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Wed, 14 Jun 2023 20:28:48 +0200 Subject: [PATCH] Generalize 'sb-tasks' to other taskbars --- .bin/sb-tasks | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.bin/sb-tasks b/.bin/sb-tasks index 0ec0689..aa3243b 100755 --- a/.bin/sb-tasks +++ b/.bin/sb-tasks @@ -2,13 +2,6 @@ num_done="$(task end.after:today status:completed count)" num_pending="$(($(task count status:pending) + $num_done))" +num_waiting="$(($(task count status:waiting)))" -if [ "$num_done" -ge "$num_pending" ];then - color="\x01" -elif [ "$num_done" -ge "$((num_pending/2))" ]; then - color="\x03" -else - color="\x04" -fi - -echo -n -e "$color Tasks: $num_done/$num_pending \x01" +echo -e "Tasks: $num_done/$num_pending+$num_waiting"