From 4e59a06ad4d261a46d5177842801ff6b37a4fc5c Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 27 Dec 2019 23:17:31 +1300 Subject: [PATCH] q: add task checklist --- pkgs/q/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/q/default.nix b/pkgs/q/default.nix index c4e855b..e85683b 100644 --- a/pkgs/q/default.nix +++ b/pkgs/q/default.nix @@ -270,6 +270,7 @@ let done ''; + q-virtualization = '' printf '%20s │ %s\n' "VT" \ $(${pkgs.systemd}/bin/systemd-detect-virt) @@ -310,6 +311,16 @@ let done ''; + q-task-checklist = '' + ${pkgs.taskwarrior}/bin/task export +checklist status:pending | \ + ${pkgs.jq}/bin/jq \ + --raw-output ' + sort_by(.description) | reverse | + .[] | + "[ \( .id ) ] \( .description )" + ' + ''; + q-task-active = '' ${pkgs.taskwarrior}/bin/task export +ACTIVE status:pending | ${pkgs.jq}/bin/jq --raw-output '.[] | "⇒ \(.id) \(.description)"' ''; @@ -332,4 +343,6 @@ in pkgs.writers.writeBashBin "q" '' ${hrule} ${q-task-active} ${hrule} + ${q-task-checklist} + ${hrule} ''