A Dive into Taskwarrior Ecosystem
Typical Workflow
- Add a simple task::
task add <description separated by spaces>
Creating a task with due dates, recurrences, and tagstask add Mow the lawn project:Lawnwork due:tomorrow recur:biweekly +home
- List tasks::
task list
- Complete a task::
task <task number> done
Commands
- show all tasks::
task all
- add task with tag::
task add +tag +tag2 <description>
- remove tag from task::
task <task number> mod -tag
- add task with project::
task add project:name.sub_project <description>
- add task with priority::
task add pri:H <description>
. H, M, L are supported. - annotate task::
task <task number> annotate <annotation>
TODO: default project, like inbox
Attributes
You can use some specific task attributes, such as:
- tags
- project
- priority
- annotations
- dates (due date, until date, schedule date, etc.)
Dates
due date
specify the exact date by which a task must be completed.scheduled date
represents the earliest opportunity to work on taskwait date
represent the earliest opportunity the task should show up on the task listuntil date
represent a date after which the task self-destructs.
Relative dates to specify:
Modify tasks
List of modification commands:
task edit
task annotate
task undo
task purge <ID> or <UUID>
Urgency
Taskwarrior has a next report, which is sorted by decreasing urgency.
Urgency is a numeric score, Taskwarrior use a weighted linear expression to calculate urgency, which can be tweaked by user.
Filters and reports
Taskwarrior has a set of pre-defined reports:
task next
(default)task completed
…
These can be further narrowed down using filters:
$ task <FILTER> <REPORT | COMMAND>
Filters - attribute modifiers
Attribute modifiers improve filters
Supported attribute modifiers are 1
Filter - expressions
You can use the following operators in filter expressions
The =
operator is not strict equality (approximate equality), sort of
ranges, to use strict equality, use ==
For example:
Reports
Each report has a default filter
Hence, a query like this:
is actually task status:pending project:Home list
. This can cause problems!
Configuration
Configuration resides in the ~/.taskrc
file
It gets auto-generated the first time you run the task command
Pretty useful settings are:
- color schemes
- dateformat
- holidays
- turning certain features on and off
Taskwarrior under the hood
is all about plaintext (generally JSON file) - look into the ~/.task/
- completed.data
- pending.data
- backlog.data
- undo.data
Garbage collection
When a task is marked as deleted, it gets a new status, and an end attribute.
The task is written back into the pending.data
file, but it doesn’t belong
there - it belongs in the completed.data
file.
Garbage Collection (garbage collection) is operation automatically run by Taskwarrior to move tasks into the correct files.
When moving tasks between the files, ID numbers are affected, because they are
simply line numbers in the pending.data
file.
Intermediate topics
— Custom reports This configurable in settings file. — Recurrence (and specifying frequencies)
- Timetracking
- Virtual tags
task +TODAY
,task +LATEST
, check more inman task
Taskserver
Docker images available. Main command is task sync
.
Context
You can switch between context using this command:
task @ <context>
UDA (user defined attributes)
DOM (useful for queries)
Hooks (run on added, modified, deleted tasks)
Basically its executable scripts.
Python integration
Wrapper for Taskwarrior.