mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdDiagnostics: Added theme swatches
This commit is contained in:
parent
b547097a00
commit
96250afdca
1 changed files with 16 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <Palette.h>
|
||||
#include <format.h>
|
||||
#include <timew.h>
|
||||
#include <algorithm>
|
||||
|
@ -182,6 +183,21 @@ int CmdDiagnostics (
|
|||
// Theme description, if present.
|
||||
if (rules.has ("theme.description"))
|
||||
out << " Color theme: " << rules.get ("theme.description") << "\n";
|
||||
else
|
||||
out << " Color theme: Default theme\n";
|
||||
|
||||
if (rules.getBoolean ("color"))
|
||||
{
|
||||
out << " ";
|
||||
Palette palette;
|
||||
for (int color = 0; color < palette.size (); ++color)
|
||||
{
|
||||
if (color && color % 16 == 0)
|
||||
out << "\n ";
|
||||
out << ' ' << palette.next ().colorize (rightJustifyZero (color, 2));
|
||||
}
|
||||
out << "\n";
|
||||
}
|
||||
|
||||
out << "\n";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue