Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
162cc776
Commit
162cc776
authored
Nov 18, 2016
by
Colin Sullivan
Committed by
Bram Schoenmakers
Nov 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
focus and mark colors can now be specified in config
parent
ac982b13
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
7 deletions
+27
-7
test/data/ColorsTest5.conf
test/data/ColorsTest5.conf
+2
-0
topydo.conf
topydo.conf
+2
-0
topydo/lib/Config.py
topydo/lib/Config.py
+14
-0
topydo/ui/columns/Main.py
topydo/ui/columns/Main.py
+9
-7
No files found.
test/data/ColorsTest5.conf
View file @
162cc776
...
...
@@ -4,3 +4,5 @@ project_color =
context_color
=
link_color
=
metadata_color
=
focus_background_color
=
marked_background_color
=
topydo.conf
View file @
162cc776
...
...
@@ -50,6 +50,8 @@ append_parent_contexts = 0
;
context_color
=
magenta
;
metadata_color
=
green
;
link_color
=
light
-
cyan
;
focus_background_color
=
gray
;
marked_background_color
=
blue
[
aliases
]
;
showall
=
ls
-
x
...
...
topydo/lib/Config.py
View file @
162cc776
...
...
@@ -106,6 +106,8 @@ class _Config:
'metadata_color'
:
'green'
,
'link_color'
:
'cyan'
,
'priority_colors'
:
'A:cyan,B:yellow,C:blue'
,
'focus_background_color'
:
'gray'
,
'marked_background_color'
:
'blue'
},
'aliases'
:
{
...
...
@@ -367,6 +369,18 @@ class _Config:
except
ValueError
:
return
Color
(
self
.
cp
.
get
(
'colorscheme'
,
'link_color'
))
def
focus_background_color
(
self
):
try
:
return
Color
(
self
.
cp
.
getint
(
'colorscheme'
,
'focus_background_color'
))
except
ValueError
:
return
Color
(
self
.
cp
.
get
(
'colorscheme'
,
'focus_background_color'
))
def
marked_background_color
(
self
):
try
:
return
Color
(
self
.
cp
.
getint
(
'colorscheme'
,
'marked_background_color'
))
except
ValueError
:
return
Color
(
self
.
cp
.
get
(
'colorscheme'
,
'marked_background_color'
))
def
auto_creation_date
(
self
):
try
:
return
self
.
cp
.
getboolean
(
'add'
,
'auto_creation_date'
)
...
...
topydo/ui/columns/Main.py
View file @
162cc776
...
...
@@ -193,18 +193,20 @@ class UIApplication(CLIApplicationBase):
context_color
=
to_urwid_color
(
config
().
context_color
())
metadata_color
=
to_urwid_color
(
config
().
metadata_color
())
link_color
=
to_urwid_color
(
config
().
link_color
())
focus_background_color
=
to_urwid_color
(
config
().
focus_background_color
())
marked_background_color
=
to_urwid_color
(
config
().
marked_background_color
())
palette
=
[
(
PaletteItem
.
PROJECT
,
''
,
''
,
''
,
project_color
,
''
),
(
PaletteItem
.
PROJECT_FOCUS
,
''
,
'light gray'
,
''
,
project_color
,
None
),
(
PaletteItem
.
PROJECT_FOCUS
,
''
,
'light gray'
,
''
,
project_color
,
focus_background_color
),
(
PaletteItem
.
CONTEXT
,
''
,
''
,
''
,
context_color
,
''
),
(
PaletteItem
.
CONTEXT_FOCUS
,
''
,
'light gray'
,
''
,
context_color
,
None
),
(
PaletteItem
.
CONTEXT_FOCUS
,
''
,
'light gray'
,
''
,
context_color
,
focus_background_color
),
(
PaletteItem
.
METADATA
,
''
,
''
,
''
,
metadata_color
,
''
),
(
PaletteItem
.
METADATA_FOCUS
,
''
,
'light gray'
,
''
,
metadata_color
,
None
),
(
PaletteItem
.
METADATA_FOCUS
,
''
,
'light gray'
,
''
,
metadata_color
,
focus_background_color
),
(
PaletteItem
.
LINK
,
''
,
''
,
''
,
link_color
,
''
),
(
PaletteItem
.
LINK_FOCUS
,
''
,
'light gray'
,
''
,
link_color
,
None
),
(
PaletteItem
.
DEFAULT_FOCUS
,
'
black'
,
'light gray'
),
(
PaletteItem
.
MARKED
,
''
,
'light blue'
),
(
PaletteItem
.
LINK_FOCUS
,
''
,
'light gray'
,
''
,
link_color
,
focus_background_color
),
(
PaletteItem
.
DEFAULT_FOCUS
,
'
'
,
'light gray'
,
''
,
''
,
focus_background_color
),
(
PaletteItem
.
MARKED
,
''
,
'light blue'
,
''
,
''
,
marked_background_color
),
]
for
C
in
ascii_uppercase
:
...
...
@@ -217,7 +219,7 @@ class UIApplication(CLIApplicationBase):
'pri_'
+
C
,
''
,
''
,
''
,
pri_color
,
''
))
palette
.
append
((
'pri_'
+
C
+
'_focus'
,
''
,
'light gray'
,
''
,
pri_color_focus
,
None
'pri_'
+
C
+
'_focus'
,
''
,
'light gray'
,
''
,
pri_color_focus
,
focus_background_color
))
return
palette
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment