enh: colorize tasks based on patterns

Bug #255512 reported by Selene ToyKeeper
2
Affects Status Importance Assigned to Milestone
TKDO
Confirmed
Medium
Selene ToyKeeper

Bug Description

Some users find colors useful to show which tasks go together. TKDO should offer a way to colorize tasks in a user-configurable way.

The easiest approach would be to have a simple list of patterns and colors, such as:

  colors = (
      ('red', '<--'),
      ('green', 'buy'),
      ('blue', 'email'),
      )

The questions here are:

  - Should patterns be plain text or regular expressions?

  - Should patterns match only title text, or other attributes? Which attributes? Contexts are an obvious fit, but what about more complicated matches, like tasks due in the next week?

  - Should colors be applied to the entire task, or should it be possible to apply different colors to different parts of the title?

  - Should the background color be configurable, or only the foreground?

My inclination for a first pass is to use plain text patterns, compare them to the raw text of the task lines, and colorize the entire task. No background colors for now. This is the simplest option, and may be sufficient.

In any case, colors should be displayed both in the GUI and on the command line, if enabled. TKDO will need to translate the colors to HTML and/or vt100 codes as appropriate.

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

BTW, see contrib/tkdoclrs in trunk r135 for Bill Powell's reference implementation.

Changed in tkdo:
status: New → Confirmed
Changed in tkdo:
milestone: none → 0.7
Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

This is implemented in the text UI, but not yet in the GUI.

Changed in tkdo:
assignee: nobody → Scott Scriven (toykeeper)
importance: Undecided → Medium
Changed in tkdo:
milestone: 0.7 → 0.8
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.