Powerline segments for showing information from the Taskwarrior task manager
Project description
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.
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 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": "taskwarrior",
"description_length": 40
}
}
License
Licensed under the MIT License.
By German Lashevich.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for powerline-taskwarrior-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3261de78544590272d20c810218b3250e22c870add5b97fc15662a53a1d09ae4 |
|
MD5 | c59b580ac7d0a51e8ec5beb062a42b5a |
|
BLAKE2b-256 | d4dd659425d8962c7dbb09ce1328ed4b8a91e4b7ddfc420862b14e853ea5e0fc |
Hashes for powerline_taskwarrior-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f7702de4c82272872d05915d08c09bcbca2ad92ccaad3420c6265a62af5e2d6 |
|
MD5 | 43d3a01ea5af62ad1e3a8195298783a1 |
|
BLAKE2b-256 | 9f8f28bb8a4fc92258e15567ad17c2bac8f976140b23936d8cbba9cf156fc483 |