Skip to content

Commit

Permalink
Rename theme 'highlight' to 'dark'
Browse files Browse the repository at this point in the history
Leave space for future 'light' theme.
  • Loading branch information
ymattw committed Nov 11, 2024
1 parent 6333e7a commit 41764d7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ python >= 3.3 and ``less`` as a pager.

See screenshots below.

Theme ``default``:
Theme ``default`` (works well for both dark and light terminal background):

.. image:: https://github.com/ymattw/ydiff/blob/master/img/side-by-side-default.png
:alt: side by side, theme 'default'
Expand All @@ -24,15 +24,15 @@ Theme ``default``:
:align: center
:height: 300 px

Theme ``highlight``:
Theme ``dark``: (for dark terminal background):

.. image:: https://github.com/ymattw/ydiff/blob/master/img/side-by-side-highlight.png
:alt: side by side, theme 'highlight'
.. image:: https://github.com/ymattw/ydiff/blob/master/img/side-by-side-dark.png
:alt: side by side, theme 'dark'
:align: center
:height: 300 px

.. image:: https://github.com/ymattw/ydiff/blob/master/img/unified-highlight.png
:alt: unified, theme 'highlight'
.. image:: https://github.com/ymattw/ydiff/blob/master/img/unified-dark.png
:alt: unified, theme 'dark'
:align: center
:height: 300 px

Expand Down Expand Up @@ -157,8 +157,7 @@ Type ``ydiff -h`` to show usage::
pager application to feed output to, default is 'less'
-o OPT, --pager-options=OPT
options to supply to pager application
--theme=THEME option to pick a color theme (one of default,
highlight)
--theme=THEME option to pick a color theme (one of default, dark)

Note:
Option parser will stop on first unknown option and pass them down to
Expand Down
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions ydiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Color(object):
'file_separator': (Color.FG_BRIGHT_CYAN,),
'wrap_marker': (Color.FG_BRIGHT_MAGENTA,),
},
'highlight': {
'dark': {
# kind: (effects,)
'header': (Color.FG_CYAN,),
'old_path': (Color.BG8_DARK_RED,),
Expand Down Expand Up @@ -789,7 +789,7 @@ def _process_args(self, largs, rargs, values):
parser.add_option(
'-o', '--pager-options', metavar='OPT',
help="""options to supply to pager application""")
themes = ', '.join(sorted(THEMES.keys()))
themes = ', '.join(['default', *sorted(THEMES.keys() - {'default'})])
parser.add_option(
'', '--theme', metavar='THEME', default='default',
help="""option to pick a color theme (one of %s)""" % themes)
Expand Down

0 comments on commit 41764d7

Please sign in to comment.