Commit 5d867764 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Remove option highlight_projects_colors in favor of colorscheme options.

No need to toggle the highlighting of projects and contexts anymore. If
you want to turn it off, simply assign an empty value to the
project/context colors:

  [colorscheme]
  project_color =
  context_color =
parent 22e61d1f
......@@ -5,7 +5,6 @@ default_command = ls
; filename = todo.txt
; archive_filename = done.txt
colors = 1
highlight_projects_contexts = 1
identifiers = linenumber ; or: text
[ls]
......
......@@ -44,7 +44,6 @@ class _Config:
# topydo
'default_command': 'ls',
'colors': '1',
'highlight_projects_contexts': '1',
'filename' : 'todo.txt',
'archive_filename' : 'done.txt',
'identifiers': 'linenumber',
......@@ -118,12 +117,6 @@ class _Config:
except ValueError:
return self.defaults['colors'] == '1'
def highlight_projects_contexts(self):
try:
return self.cp.getboolean('topydo', 'highlight_projects_contexts')
except ValueError:
return self.defaults['highlight_projects_contexts'] == '1'
def todotxt(self):
return os.path.expanduser(self.cp.get('topydo', 'filename'))
......
......@@ -56,8 +56,10 @@ class PrettyPrinterColorFilter(PrettyPrinterFilter):
except KeyError:
pass
# color by priority
p_todo_str = color + p_todo_str
if config().highlight_projects_contexts():
# color projects / contexts
p_todo_str = re.sub(
r'\B(\+|@)(\S*\w)',
lambda m: (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment