mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 00:57:19 +02:00
Color
- Supports 'color.label.sort' for column labels of sort columns.
This commit is contained in:
parent
aac0753b07
commit
39469a1917
5 changed files with 22 additions and 1 deletions
|
@ -206,6 +206,7 @@
|
||||||
match on the day by default, not the time also.
|
match on the day by default, not the time also.
|
||||||
- Supports 'debug.hooks' configuration setting.
|
- Supports 'debug.hooks' configuration setting.
|
||||||
- Supports 'debug.parser' configuration setting.
|
- Supports 'debug.parser' configuration setting.
|
||||||
|
- Supports 'color.label.sort' for column labels of sort columns.
|
||||||
|
|
||||||
------ current release ---------------------------
|
------ 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 'hooks' setting is a master control switch for hook processing.
|
||||||
- New 'debug.hooks' for debugging hook scripts.
|
- New 'debug.hooks' for debugging hook scripts.
|
||||||
- New 'debug.parser' for debugging parser issues 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
|
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.
|
Colors the report labels. Defaults to not use color.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B color.label.sort=
|
||||||
|
Colors the report labels for sort columns. Defaults to color.label.
|
||||||
|
.RE
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B color.alternate=on rgb253
|
.B color.alternate=on rgb253
|
||||||
Color of alternate tasks.
|
Color of alternate tasks.
|
||||||
|
|
|
@ -128,10 +128,16 @@ int CmdCustom::execute (std::string& output)
|
||||||
Color label (context.config.get ("color.label"));
|
Color label (context.config.get ("color.label"));
|
||||||
view.colorHeader (label);
|
view.colorHeader (label);
|
||||||
|
|
||||||
|
Color label_sort (context.config.get ("color.label.sort"));
|
||||||
|
view.colorSortHeader (label_sort);
|
||||||
|
|
||||||
Color alternate (context.config.get ("color.alternate"));
|
Color alternate (context.config.get ("color.alternate"));
|
||||||
view.colorOdd (alternate);
|
view.colorOdd (alternate);
|
||||||
view.intraColorOdd (alternate);
|
view.intraColorOdd (alternate);
|
||||||
|
|
||||||
|
// Capture columns that are sorted.
|
||||||
|
std::vector <std::string> sortColumns;
|
||||||
|
|
||||||
// Add the break columns, if any.
|
// Add the break columns, if any.
|
||||||
std::vector <std::string>::iterator so;
|
std::vector <std::string>::iterator so;
|
||||||
for (so = sortOrder.begin (); so != sortOrder.end (); ++so)
|
for (so = sortOrder.begin (); so != sortOrder.end (); ++so)
|
||||||
|
@ -143,6 +149,8 @@ int CmdCustom::execute (std::string& output)
|
||||||
|
|
||||||
if (breakIndicator)
|
if (breakIndicator)
|
||||||
view.addBreak (name);
|
view.addBreak (name);
|
||||||
|
|
||||||
|
sortColumns.push_back (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the columns and labels.
|
// Add the columns and labels.
|
||||||
|
@ -151,7 +159,12 @@ int CmdCustom::execute (std::string& output)
|
||||||
Column* c = Column::factory (columns[i], _keyword);
|
Column* c = Column::factory (columns[i], _keyword);
|
||||||
if (i < labels.size ())
|
if (i < labels.size ())
|
||||||
c->setLabel (labels[i]);
|
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?
|
// How many lines taken up by table header?
|
||||||
|
|
|
@ -107,6 +107,7 @@ int CmdShow::execute (std::string& output)
|
||||||
" color.history.delete"
|
" color.history.delete"
|
||||||
" color.history.done"
|
" color.history.done"
|
||||||
" color.label"
|
" color.label"
|
||||||
|
" color.label.sort"
|
||||||
" color.overdue"
|
" color.overdue"
|
||||||
" color.pri.H"
|
" color.pri.H"
|
||||||
" color.pri.L"
|
" color.pri.L"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue