q: add task checklist

This commit is contained in:
Ingolf Wagner 2019-12-27 23:17:31 +13:00
parent 1a9b49087b
commit 4e59a06ad4
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -270,6 +270,7 @@ let
done done
''; '';
q-virtualization = '' q-virtualization = ''
printf '%20s %s\n' "VT" \ printf '%20s %s\n' "VT" \
$(${pkgs.systemd}/bin/systemd-detect-virt) $(${pkgs.systemd}/bin/systemd-detect-virt)
@ -310,6 +311,16 @@ let
done 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 = '' q-task-active = ''
${pkgs.taskwarrior}/bin/task export +ACTIVE status:pending | ${pkgs.jq}/bin/jq --raw-output '.[] | " \(.id) \(.description)"' ${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} ${hrule}
${q-task-active} ${q-task-active}
${hrule} ${hrule}
${q-task-checklist}
${hrule}
'' ''