Color
- Supports 'color.label.sort' for column labels of sort columns.
This commit is contained in:
@@ -206,6 +206,7 @@
|
||||
match on the day by default, not the time also.
|
||||
- Supports 'debug.hooks' configuration setting.
|
||||
- Supports 'debug.parser' configuration setting.
|
||||
- Supports 'color.label.sort' for column labels of sort columns.
|
||||
|
||||
------ current release ---------------------------
|
||||
|
||||
|
||||
1
NEWS
1
NEWS
@@ -41,6 +41,7 @@ New configuration options in taskwarrior 2.4.0
|
||||
- New 'hooks' setting is a master control switch for hook processing.
|
||||
- New 'debug.hooks' for debugging hook scripts.
|
||||
- New 'debug.parser' for debugging parser issues scripts.
|
||||
- New 'color.label.sort' is used to color the column label of sort columns.
|
||||
|
||||
Newly deprecated features in taskwarrior 2.4.0
|
||||
|
||||
|
||||
@@ -928,6 +928,11 @@ Color of weeknumbers in calendar.
|
||||
Colors the report labels. Defaults to not use color.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.label.sort=
|
||||
Colors the report labels for sort columns. Defaults to color.label.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
.B color.alternate=on rgb253
|
||||
Color of alternate tasks.
|
||||
|
||||
@@ -128,10 +128,16 @@ int CmdCustom::execute (std::string& output)
|
||||
Color label (context.config.get ("color.label"));
|
||||
view.colorHeader (label);
|
||||
|
||||
Color label_sort (context.config.get ("color.label.sort"));
|
||||
view.colorSortHeader (label_sort);
|
||||
|
||||
Color alternate (context.config.get ("color.alternate"));
|
||||
view.colorOdd (alternate);
|
||||
view.intraColorOdd (alternate);
|
||||
|
||||
// Capture columns that are sorted.
|
||||
std::vector <std::string> sortColumns;
|
||||
|
||||
// Add the break columns, if any.
|
||||
std::vector <std::string>::iterator so;
|
||||
for (so = sortOrder.begin (); so != sortOrder.end (); ++so)
|
||||
@@ -143,6 +149,8 @@ int CmdCustom::execute (std::string& output)
|
||||
|
||||
if (breakIndicator)
|
||||
view.addBreak (name);
|
||||
|
||||
sortColumns.push_back (name);
|
||||
}
|
||||
|
||||
// Add the columns and labels.
|
||||
@@ -151,7 +159,12 @@ int CmdCustom::execute (std::string& output)
|
||||
Column* c = Column::factory (columns[i], _keyword);
|
||||
if (i < labels.size ())
|
||||
c->setLabel (labels[i]);
|
||||
view.add (c);
|
||||
|
||||
bool sort = std::find (sortColumns.begin (), sortColumns.end (), c->name ()) != sortColumns.end ()
|
||||
? true
|
||||
: false;
|
||||
|
||||
view.add (c, sort);
|
||||
}
|
||||
|
||||
// How many lines taken up by table header?
|
||||
|
||||
@@ -107,6 +107,7 @@ int CmdShow::execute (std::string& output)
|
||||
" color.history.delete"
|
||||
" color.history.done"
|
||||
" color.label"
|
||||
" color.label.sort"
|
||||
" color.overdue"
|
||||
" color.pri.H"
|
||||
" color.pri.L"
|
||||
|
||||
Reference in New Issue
Block a user