Powerline Taskwarrior
A set of Powerline segments for showing information retrieved from Taskwarrior task manager.
It shows a current context and the most urgent active task.
Requirements
Taskwarrior segments require:
- task v2.4.2 or later,
- Python
^3.7(support for Python 2.7 was dropped)
Installation
PIP
pip install --user -U powerline-taskwarrior
It can also be installed system-wide, but this is usually a bad idea.
Debian
On Debian (testing or unstable), installation can be performed with apt:
apt install python-powerline-taskwarrior
Usage
Activate segments
To activate Taskwarrior segments add them to your segment configuration.
See more about powerline configuration in the official documentation.
For example, I store powerline configuration in
~/.config/powerline/themes/shell/default.json.
These are available powerline-taskwarrior segments:
-
display current context name
{ "function": "powerline_taskwarrior.context", "priority": 70 }
-
display the count of pending tasks
{ "function": "powerline_taskwarrior.pending_tasks_count", "priority": 70 }
-
display the most urgent active task
{ "function": "powerline_taskwarrior.active_task", "priority": 70 }
-
display the most urgent next task
{ "function": "powerline_taskwarrior.next_task", "priority": 70 }
-
obsolete segment displays both of listed above
{ "function": "powerline_taskwarrior.taskwarrior", "priority": 70 }
Color scheme
Taskwarrior-powerline requires custom colorscheme to be configured.
Add the following to your colorschemes (.config/powerline/colorschemes/default.json):
{
"groups": {
"taskwarrior:context": "information:regular",
"taskwarrior:pending_tasks_count": "information:priority",
"taskwarrior:active_id": { "bg": "mediumgreen", "fg": "black", "attrs": [] },
"taskwarrior:active_desc": { "bg": "green", "fg": "black", "attrs": [] },
"taskwarrior:next_id": { "bg": "brightyellow", "fg": "black", "attrs": [] },
"taskwarrior:next_desc": { "bg": "yellow", "fg": "black", "attrs": [] }
}
}
And here you can configure the colors.
See powerline colorschemes docs for more details.
Further customization
If you have a custom name for task command, it should be specified via task_alias argument in the segment configuration.
powerline_taskwarrior.active_task and powerline_taskwarrior.next_task segments accept description_length parameter.
It is an integer which represents a maximum length of the description field.
If a description is longer than description_length, it is truncated by words.
powerline_taskwarrior.next_task segment accepts ignore_active parameter.
If it set to true, the segment will be shown always, regardless of existence of an active task.
{
"function": "powerline_taskwarrior.next_task",
"priority": 70,
"args": {
"task_alias": "taskwarrior",
"description_length": 40
}
}
License
Licensed under the MIT License.
By German Lashevich.
Release files for powerline-taskwarrior 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| powerline-taskwarrior-2.0.0.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| powerline_taskwarrior-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / powerline-taskwarrior-2.0.0.tar.gz
| Download URL | powerline-taskwarrior-2.0.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
479ef617064383478753c63d0b1d994dd2c02ef8b056310b6eb8186284a38649
|
|
BLAKE2b-256 checksum How to use checksums |
8eecb0894d5748a56c7b94c59e6f01b231c5ede9936182db4628b7f436376ebc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.9.7 Linux/5.8.0-1042-azure
|
Release files / powerline_taskwarrior-2.0.0-py3-none-any.whl
| Download URL | powerline_taskwarrior-2.0.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee74b1a482a5cd12bd7e88c579af210d76a096db41e6014d8ea3745deaf1a08e
|
|
BLAKE2b-256 checksum How to use checksums |
192f9591b550852a718a7048989ab95d6ad8b90ccc70f580b630e6800c74872d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.9.7 Linux/5.8.0-1042-azure
|