mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 04:27:20 +02:00
Configuration Variable - due
- Added support for the "due" configuration variable that defines how many days into the future when a task is considered due.
This commit is contained in:
parent
6faf1e44f5
commit
01b3cb190c
7 changed files with 30 additions and 12 deletions
|
@ -80,7 +80,11 @@ void initializeColorRules (Config& conf)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void autoColorize (T& task, Text::color& fg, Text::color& bg)
|
||||
void autoColorize (
|
||||
T& task,
|
||||
Text::color& fg,
|
||||
Text::color& bg,
|
||||
Config& conf)
|
||||
{
|
||||
// Note: fg, bg already contain colors specifically assigned via command.
|
||||
// Note: These rules form a hierarchy - the last rule is king.
|
||||
|
@ -159,7 +163,7 @@ void autoColorize (T& task, Text::color& fg, Text::color& bg)
|
|||
{
|
||||
Date dueDate (::atoi (due.c_str ()));
|
||||
Date now;
|
||||
Date then (now + 7 * 86400);
|
||||
Date then (now + conf.get ("due", 7) * 86400);
|
||||
|
||||
// Overdue
|
||||
if (dueDate < now)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue