mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Feature #481 - color should follow rc order
- Added feature #481, allowing for user control of the color rule order of precedence via the 'rule.precedence.color' configuration variable. - Color rules now obey the rc.search.case.sensitive configuration option. - The color.keyword.XXX color rule now applies to annotations too.
This commit is contained in:
parent
c27097e286
commit
4cd528661a
11 changed files with 442 additions and 276 deletions
|
@ -236,6 +236,20 @@ It is possible to create a very colorful mix of rules. With 256-color support,
|
|||
those colors can be made subtle, and complementary, but without care, this can
|
||||
be a visual mess. Beware!
|
||||
|
||||
The precedence for the color rules is determined by the configuration variable
|
||||
'rule.precedence.color', which by default contains:
|
||||
|
||||
due.today,active,blocked,overdue,due,keyword,project,tag,recurring,pri,tagged
|
||||
|
||||
These are just the color rules with the 'color.' prefix removed. The rule
|
||||
'color.due.today' is the highest precedence, and 'color.tagged' is the lowest.
|
||||
|
||||
The keyword rule shown here as 'keyword' corresponds to a wildcard pattern,
|
||||
meaning 'color.keyword.*', or in other words all the keyword rules. Similarly
|
||||
for the 'color.tag.*' and 'color.project.*' rules.
|
||||
|
||||
There is also 'color.project.none', 'color.tag.none' and 'color.pri.none'.
|
||||
|
||||
.SH THEMES
|
||||
Taskwarrior supports themes. What this really means is that with the ability to
|
||||
include other files into the .taskrc file, different sets of color rules can
|
||||
|
@ -266,6 +280,10 @@ dark-green-256.theme
|
|||
dark-blue-256.theme
|
||||
.RE
|
||||
|
||||
You can also see how the theme will color the various tasks with the command:
|
||||
|
||||
$ task color legend
|
||||
|
||||
Better yet, create your own, and share it. We will gladly host the theme file
|
||||
on <http://taskwarrior.org>.
|
||||
|
||||
|
|
|
@ -536,40 +536,50 @@ terminal, can be obtained by running the command:
|
|||
.B task color
|
||||
.RE
|
||||
|
||||
|
||||
.RS
|
||||
The coloration rules and their defaults are:
|
||||
The coloration rules are:
|
||||
.RE
|
||||
|
||||
.RS
|
||||
.B color.overdue=bold red
|
||||
The color for overdue tasks.
|
||||
.B color.due.today
|
||||
Task is due today
|
||||
.br
|
||||
.B color.due.today=bold magenta
|
||||
The color of tasks due today.
|
||||
.B color.active
|
||||
Task is started, therefore active.
|
||||
.br
|
||||
.B color.due=bold yellow
|
||||
The color of due tasks.
|
||||
.B color.blocked
|
||||
Task is blocked by a dependency.
|
||||
.br
|
||||
.B color.pri.H=bold
|
||||
The color of priority:H tasks.
|
||||
.B color.overdue
|
||||
Task is overdue (due some time prior to now).
|
||||
.br
|
||||
.B color.pri.M=on yellow
|
||||
The color of priority:M tasks. No default value.
|
||||
.B color.due
|
||||
Task is coming due.
|
||||
.br
|
||||
.B color.pri.L=on green
|
||||
The color of priority:L tasks. No default value.
|
||||
.B color.project.none
|
||||
Task does not have an assigned project.
|
||||
.br
|
||||
.B color.pri.none=white on blue
|
||||
The color of priority: tasks. No default value.
|
||||
.B color.tag.none
|
||||
Task has no tags.
|
||||
.br
|
||||
.B color.active=bold cyan
|
||||
The color of active tasks.
|
||||
.B color.tagged
|
||||
Task has at least one tag.
|
||||
.br
|
||||
.B color.tagged=yellow
|
||||
The color of tagged tasks.
|
||||
.B color.recurring
|
||||
Task is recurring.
|
||||
.br
|
||||
.B color.recurring=on red
|
||||
The color for recurring tasks.
|
||||
.B color.pri.H
|
||||
Task has priority H.
|
||||
.br
|
||||
.B color.pri.M
|
||||
Task has priority M.
|
||||
.br
|
||||
.B color.pri.L
|
||||
Task has priority L.
|
||||
.br
|
||||
.B color.pri.none
|
||||
Task has no priority.
|
||||
.RE
|
||||
.RE
|
||||
|
||||
|
@ -690,6 +700,15 @@ Colors used by the undo command, to indicate the values both before and after
|
|||
a change that is to be reverted.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B rule.precedence.color=overdue,tag,project,keyword,active,...
|
||||
.RS
|
||||
This setting specifies the precedence of the color rules, from highest to
|
||||
lowest. Note that the prefix 'color.' is omitted (for brevity), and that any
|
||||
wildcard values (color.tag.XXX) is shortened to 'tag', which places all specific
|
||||
tag rules at the same precedence, again for brevity.
|
||||
.RE
|
||||
|
||||
.SS SHADOW FILE
|
||||
|
||||
.TP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue