diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index bf0ed5a..7e06784 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -23,7 +23,7 @@ Considerations
- If you're adding a new feature, try to include a few test cases.
See the section below on setting up your test environment
-- If you tried, but you **ABSOLUTELY CAN'T** get the tests to run, it's ok
+- If you tried, but you can't get the tests running in your environment, it's ok
- If you are unsure about anything, ask!
Submitting a pull request
@@ -70,7 +70,7 @@ This both speeds up the tests and helps to maintain consistency across runs.
.. code-block:: bash
- $ pip install pytest vcrpy --upgrade
+ $ pip install rtv[test]
2. Set your ``$PYTHONPATH`` to point to the directory of your RTV repository.
@@ -92,11 +92,11 @@ This both speeds up the tests and helps to maintain consistency across runs.
4. By default, the cassettes will act as read-only.
If you have written a new test and would like to record a cassette, you must provide your own refresh token.
The easiest thing to do is to use the token generated by RTV when you log in.
- This is usually stored as *~/.config/rtv/refresh-token*.
+ This is usually stored as *~/.local/share/rtv/refresh-token*.
.. code-block:: bash
- $ python -m pytest ~/code/rtv/tests/ --record-mode once --refresh-token ~/.config/rtv/refresh-token
+ $ python -m pytest ~/code/rtv/tests/ --record-mode once --refresh-token ~/.local/share/rtv/refresh-token
================================ test session starts ================================
platform linux -- Python 3.4.0, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
rootdir: ~/code/rtv/, inifile:
diff --git a/MANIFEST.in b/MANIFEST.in
index bdbdeb7..696abb8 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -5,3 +5,4 @@ include README.md
include LICENSE
include rtv.1
include rtv/templates/*
+include rtv/themes/*
diff --git a/README.md b/README.md
index 6dce074..8ee9423 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
-RTV provides an interface to view and interact with reddit from your terminal.
+RTV provides a terminal interface to view and interact with reddit.
It's compatible with most terminal emulators on Linux and macOS.
@@ -107,7 +107,7 @@ Press / to open the navigation prompt, where you can type things like
- ``/u/multi-mod/m/art``
- ``/domain/github.com``
-See [CONTROLS](https://github.com/michael-lazar/rtv/blob/master/CONTROLS.rst) for the full list of commands.
+See [CONTROLS](CONTROLS.rst) for the full list of commands.
## Settings
@@ -115,7 +115,7 @@ See [CONTROLS](https://github.com/michael-lazar/rtv/blob/master/CONTROLS.rst) fo
Configuration files are stored in the ``{HOME}/.config/rtv/`` directory.
-Check out [rtv.cfg](https://github.com/michael-lazar/rtv/blob/master/rtv/templates/rtv.cfg) for the full list of configurable options. You can clone this file into your home directory by running:
+Check out [rtv.cfg](rtv/templates/rtv.cfg) for the full list of configurable options. You can clone this file into your home directory by running:
```bash
$ rtv --copy-config
@@ -135,7 +135,7 @@ A mailcap file allows you to associate different MIME media types, like ``image/
$ rtv --copy-mailcap
```
-This template contains examples for common MIME types that work with popular reddit websites like *imgur*, *youtube*, and *gfycat*. Open the mailcap template and follow the [instructions](https://github.com/michael-lazar/rtv/blob/master/rtv/templates/mailcap) listed inside.
+This template contains examples for common MIME types that work with popular reddit websites like *imgur*, *youtube*, and *gfycat*. Open the mailcap template and follow the [instructions](rtv/templates/mailcap) listed inside.
Once you've setup your mailcap file, enable it by launching rtv with the ``rtv --enable-media`` flag (or set it in your **rtv.cfg**)
@@ -162,78 +162,41 @@ The default programs that RTV interacts with can be configured through environme
### Clipboard
-RTV supports copying submission links to the OS clipboard.
-On macOS this is supported out of the box.
+
+RTV supports copying submission links to the OS clipboard. On macOS this is supported out of the box.
On Linux systems you will need to install either [xsel](http://www.vergenet.net/~conrad/software/xsel/) or [xclip](https://sourceforge.net/projects/xclip/).
## Themes
-### Usage
-
-Use the ``--theme`` flag to select a theme (or set it in your **rtv.cfg**):
-
-```bash
-$ rtv --theme=papercolor
-```
-
-You can view the list of built-in and installed themes with the ``--list-themes`` flag:
-
-```bash
-$ rtv --list-themes
-
-Installed (~/.config/rtv/themes/):
- (empty)
-
-Presets:
- molokai [requires 256 colors]
- papercolor [requires 256 colors]
- solarized-dark [requires 256 colors]
- solarized-light [requires 256 colors]
-
-Built-in:
- default [requires 8 colors]
- monochrome [requires 0 colors]
-```
-
-Inside of RTV, the F2 & F3 keys can also be used to preview the available themes.
-
-### Preview
+Themes can be used to customize the look and feel of RTV
+List installed themes with ``--list-themes`` command, and select one with ``--theme``. You can also set the theme permenantly in your [rtv.cfg](rtv/templates/rtv.cfg) file. You can use the F2 & F3 keys inside of RTV to preview themes.
+
+For instructions on writing and installing your own themes, see [THEMES.md](THEMES.md).
+
## FAQ
@@ -282,8 +245,8 @@ Inside of RTV, the F2 & F3 keys can also be used to previe
## Contributing
All feedback and suggestions are welcome, just post an issue!
-Before writing any code, please read the [Contributor Guidelines](https://github.com/michael-lazar/rtv/blob/master/CONTRIBUTING.rst).
+Before writing any code, please read the [Contributor Guidelines](CONTRIBUTING.rst).
## License
-This project is distributed under the [MIT](https://github.com/michael-lazar/rtv/blob/master/LICENSE) license.
+This project is distributed under the [MIT](LICENSE) license.
diff --git a/THEMES.md b/THEMES.md
index aef5db7..e0a75c6 100644
--- a/THEMES.md
+++ b/THEMES.md
@@ -1,85 +1,77 @@
# Themes
-Different themes can be used to customize the look and feel of RTV.
-They control the color and special attributes (bold, underline, etc.) of
-every text element drawn on the screen.
+## Installing Themes
-## Usage
+You can install custom themes by copying them into your **~/.config/rtv/themes/**
+directory. The name of the theme will match the name of the file.
-Use the ``--theme`` flag to select a theme:
-
-```bash
-$ rtv --theme=papercolor
+```
+$ cp my-custom-theme.cfg ~/.config/rtv/themes/
+$ rtv --theme my-custom-theme
```
-You can also view a list of built-in and installed themes by using the ``--list-themes`` flag:
+If you've created a cool theme and would like to share it with the community,
+please submit a pull request!
-```bash
-$ rtv --list-themes
+## A quick primer on ANSI colors
-Installed (~/.config/rtv/themes/):
- (empty)
+Color support on modern terminals can be split into 4 categories:
-Presets:
- molokai [requires 256 colors]
- papercolor [requires 256 colors]
- solarized-dark [requires 256 colors]
- solarized-light [requires 256 colors]
+1. No support for colors
+2. 8 system colors - Black, Red, Green, Yellow, Blue, Magenta,
+ Cyan, and White
+3. 16 system colors - Everything above + bright variations
+4. 256 extended colors - Everything above + 6x6x6 color palette + 24 greyscale colors
-Built-in:
- default [requires 8 colors]
- monochrome [requires 0 colors]
+
+
+
The 256 terminal color codes, image from https://github.com/eikenb/terminal_colors
+
+
+The 16 system colors, along with the default foreground and background,
+can usually be customized through your terminal's profile settings. The
+6x6x6 color palette and grayscale colors are constant RGB values across
+all terminals. RTV's default theme only uses the 8 primary system colors,
+which is why it matches the "look and feel" of the terminal that you're
+running it in.
+
+
+
+
Setting the 16 system colors in iTerm preferences
+
+
+The curses library determines your terminal's color support by reading your
+environment's ``$TERM`` variable, and looking up your terminal's
+capabilities in the [terminfo](https://linux.die.net/man/5/terminfo)
+database. You can emulate this behavior by using the ``tput`` command:
+
+```
+bash$ export TERM=xterm
+bash$ tput colors
+8
+bash$ export TERM=xterm-256color
+bash$ tput colors
+256
+bash$ export TERM=vt220
+bash$ tput colors
+-1
```
-Custom themes can be installed by copying them into the **{HOME}/.config/rtv/themes/** folder.
+In general you should not be setting your ``$TERM`` variable manually,
+it will be set automatically by you terminal. Often, problems with
+terminal colors can be traced back to somebody hardcoding
+``TERM=xterm-256color`` in their .bashrc file.
-The F2 & F3 keys can be used to cycle through themes from within RTV.
+## Understanding RTV Themes
-## Preview
-
-
-
- |
- Default
- Uses the terminal's preset 16 color palette
-
- |
-
- Monochrome
- Fallback for terminals that don't support colors
-
- |
-
-
- |
- Solarized Dark
-
- |
-
- Solarized Light
-
- |
-
-
- |
- Papercolor
-
- |
-
- Molokai
-
- |
-
-
-
-## Designing a theme
+Here's an example of what an RTV theme file looks like:
```
[theme]
; =
-Normal = default default -
-Selected = - - -
-SelectedCursor = - - reverse
+Normal = default default normal
+Selected = default default normal
+SelectedCursor = default default reverse
TitleBar = cyan - bold+reverse
OrderBar = yellow - bold
@@ -126,3 +118,100 @@ Link = blue - underline
LinkSeen = magenta - underline
UserFlair = yellow - bold
```
+
+Every piece of text drawn on the screen is assigned to an ````,
+which has three properties:
+
+- ````: The text color
+- ````: The background color
+- ````: Additional text attributes, like bold or underlined
+
+### Colors
+
+The ```` and ```` properties can be set to any the following values:
+
+- ``default``, which means use the terminal's default foreground or background color.
+- The 16 system colors:
+
+
+ | black | dark_gray |
+ | red | bright_red |
+ | green | bright_green |
+ | yellow | bright_yellow |
+ | blue | bright_blue |
+ | magenta | bright_magenta |
+ | cyan | bright_cyan |
+ | light_gray | white |
+
+
+- ``ansi_{n}``, where n is between 0 and 255. These will map to their
+ corresponding ANSI colors (see the figure above).
+- Hex RGB codes, like ``#0F0F0F``, which will be converted to their nearest
+ ANSI color. This is generally not recommended because the conversion process
+ downscales the color resolution and the resulting colors will look "off".
+
+### Attributes
+
+The ```` property can be set to any of the following values:
+
+- ``normal``, ``bold``, ``underline``, or ``standout``.
+- ``reverse`` will swap the foreground and background colors.
+
+Attributes can be mixed together using the + symbol. For example,
+ ``bold+underline`` will make the text bold and underlined.
+
+### Modifiers
+
+RTV themes use special "modifer" elements to define the default
+application style. This allows you to do things like set the default
+background color without needing to set ```` on every
+single element. The three modifier elements are:
+
+- ``Normal`` - The default modifier that applies to all text elements.
+- ``Selected`` - Applies to text elements that are highlighted on the page.
+- ``SelectedCursor`` - Like ``Selected``, but only applies to ``CursorBlock``
+ and ``CursorBar{n}`` elements.
+
+When an element is marked with a ``-`` token, it means inherit the
+attribute value from the relevant modifier. This is best explained
+through an example:
+
+```
+[theme]
+; =
+Normal = ansi_241 ansi_230 normal
+Selected = ansi_241 ansi_254 normal
+SelectedCursor = ansi_241 ansi_254 bold+reverse
+
+Link = ansi_33 - underline
+```
+
+
+
+
The default solarized-light theme
+
+
+In the snippet above, the ``Link`` element has its background color set
+to the ``-`` token. This means that it will inherit it's background
+from either the ``Normal`` (light yellow) or the ``Selected`` (light grey)
+element, depending on if it's selected or not.
+
+Compare this with what happens when the ``Link`` background is explicitly set to ``ansi_230``:
+
+```
+[theme]
+; =
+Normal = ansi_241 ansi_230 normal
+Selected = ansi_241 ansi_254 normal
+SelectedCursor = ansi_241 ansi_254 bold+reverse
+
+Link = ansi_33 ansi_230 underline
+```
+
+
+
+
The Link element hard-coded to ansi_230
+
+
+In this case, the ``Link`` background stays yellow even when the link is
+selected by the cursor.
diff --git a/resources/iterm_preferences.png b/resources/iterm_preferences.png
new file mode 100644
index 0000000..1e53585
Binary files /dev/null and b/resources/iterm_preferences.png differ
diff --git a/resources/terminal_colors.png b/resources/terminal_colors.png
new file mode 100644
index 0000000..5d2ec8f
Binary files /dev/null and b/resources/terminal_colors.png differ
diff --git a/resources/theme_modifiers.png b/resources/theme_modifiers.png
new file mode 100644
index 0000000..1f0d86a
Binary files /dev/null and b/resources/theme_modifiers.png differ
diff --git a/resources/theme_modifiers_2.png b/resources/theme_modifiers_2.png
new file mode 100644
index 0000000..8abd330
Binary files /dev/null and b/resources/theme_modifiers_2.png differ
diff --git a/rtv/config.py b/rtv/config.py
index f7eb0af..bbecbd1 100644
--- a/rtv/config.py
+++ b/rtv/config.py
@@ -20,12 +20,13 @@ TEMPLATES = os.path.join(PACKAGE, 'templates')
DEFAULT_CONFIG = os.path.join(TEMPLATES, 'rtv.cfg')
DEFAULT_MAILCAP = os.path.join(TEMPLATES, 'mailcap')
DEFAULT_THEMES = os.path.join(PACKAGE, 'themes')
-XDG_HOME = os.getenv('XDG_CONFIG_HOME', os.path.join(HOME, '.config'))
-CONFIG = os.path.join(XDG_HOME, 'rtv', 'rtv.cfg')
+XDG_CONFIG_HOME = os.getenv('XDG_CONFIG_HOME', os.path.join(HOME, '.config'))
+XDG_DATA_HOME = os.getenv('XDG_DATA_HOME', os.path.join(HOME, '.local', 'share'))
+CONFIG = os.path.join(XDG_CONFIG_HOME, 'rtv', 'rtv.cfg')
MAILCAP = os.path.join(HOME, '.mailcap')
-TOKEN = os.path.join(XDG_HOME, 'rtv', 'refresh-token')
-HISTORY = os.path.join(XDG_HOME, 'rtv', 'history.log')
-THEMES = os.path.join(XDG_HOME, 'rtv', 'themes')
+TOKEN = os.path.join(XDG_DATA_HOME, 'rtv', 'refresh-token')
+HISTORY = os.path.join(XDG_DATA_HOME, 'rtv', 'history.log')
+THEMES = os.path.join(XDG_CONFIG_HOME, 'rtv', 'themes')
def build_parser():
diff --git a/rtv/subreddit_page.py b/rtv/subreddit_page.py
index 1d060d2..04a35bf 100644
--- a/rtv/subreddit_page.py
+++ b/rtv/subreddit_page.py
@@ -303,17 +303,20 @@ class SubredditPage(Page):
offset = 0 if not inverted else -(data['n_rows'] - n_rows)
n_title = len(data['split_title'])
- for row, text in enumerate(data['split_title'], start=offset):
+ if data['url_full'] in self.config.history:
+ attr = self.term.attr('SubmissionTitleSeen')
+ else:
attr = self.term.attr('SubmissionTitle')
+ for row, text in enumerate(data['split_title'], start=offset):
if row in valid_rows:
self.term.add_line(win, text, row, 1, attr)
row = n_title + offset
+ if data['url_full'] in self.config.history:
+ attr = self.term.attr('LinkSeen')
+ else:
+ attr = self.term.attr('Link')
if row in valid_rows:
- if data['url_full'] in self.config.history:
- attr = self.term.attr('LinkSeen')
- else:
- attr = self.term.attr('Link')
self.term.add_line(win, '{url}'.format(**data), row, 1, attr)
row = n_title + offset + 1
diff --git a/rtv/theme.py b/rtv/theme.py
index 173aea1..8ecd971 100644
--- a/rtv/theme.py
+++ b/rtv/theme.py
@@ -54,9 +54,9 @@ class Theme(object):
# can only use the 8 basic colors with the default color as the background
DEFAULT_THEME = {
'modifiers': {
- 'Normal': (-1, -1, None),
- 'Selected': (None, None, None),
- 'SelectedCursor': (None, None, curses.A_REVERSE),
+ 'Normal': (-1, -1, curses.A_NORMAL),
+ 'Selected': (-1, -1, curses.A_NORMAL),
+ 'SelectedCursor': (-1, -1, curses.A_REVERSE),
},
'page': {
'TitleBar': (curses.COLOR_CYAN, None, curses.A_BOLD | curses.A_REVERSE),
@@ -103,6 +103,7 @@ class Theme(object):
'SubmissionSubreddit': (curses.COLOR_YELLOW, None, None),
'SubmissionText': (None, None, None),
'SubmissionTitle': (None, None, curses.A_BOLD),
+ 'SubmissionTitleSeen': (None, None, None),
'Upvote': (curses.COLOR_GREEN, None, curses.A_BOLD),
'Link': (curses.COLOR_BLUE, None, curses.A_UNDERLINE),
'LinkSeen': (curses.COLOR_MAGENTA, None, curses.A_UNDERLINE),
@@ -160,6 +161,18 @@ class Theme(object):
elements[key] = (None, None, None)
self._set_fallback(elements, 'Normal', (-1, -1, curses.A_NORMAL))
+ self._set_fallback(elements, 'Selected', 'Normal')
+ self._set_fallback(elements, 'SelectedCursor', 'Normal')
+
+ # Create the "Selected" versions of elements, which are prefixed with
+ # the @ symbol. For example, "@CommentText" represents how comment
+ # text is formatted when it is highlighted by the cursor.
+ for name in self.DEFAULT_THEME['normal']:
+ dest = '@{0}'.format(name)
+ self._set_fallback(elements, name, 'Selected', dest)
+ for name in self.DEFAULT_THEME['cursor']:
+ dest = '@{0}'.format(name)
+ self._set_fallback(elements, name, 'SelectedCursor', dest)
# Fill in the ``None`` values for all of the elements with normal text
for name in self.DEFAULT_THEME['normal']:
@@ -169,19 +182,6 @@ class Theme(object):
for name in self.DEFAULT_THEME['page']:
self._set_fallback(elements, name, 'Normal')
- # Create the "Selected" versions of elements, which are prefixed with
- # the @ symbol. For example, "@CommentText" represents how comment
- # text is formatted when it is highlighted by the cursor.
- for name in self.DEFAULT_THEME['normal']:
- dest = '@{0}'.format(name)
- self._set_fallback(elements, 'Selected', name, dest)
- for name in self.DEFAULT_THEME['cursor']:
- dest = '@{0}'.format(name)
- self._set_fallback(elements, 'SelectedCursor', name, dest)
-
- self._set_fallback(elements, 'Selected', 'Normal')
- self._set_fallback(elements, 'SelectedCursor', 'Normal')
-
self.elements = elements
if self.use_color:
diff --git a/rtv/themes/default.cfg.example b/rtv/themes/default.cfg.example
index 5773510..07c372a 100644
--- a/rtv/themes/default.cfg.example
+++ b/rtv/themes/default.cfg.example
@@ -1,8 +1,8 @@
[theme]
; =
-Normal = default default -
-Selected = - - -
-SelectedCursor = - - reverse
+Normal = default default normal
+Selected = default default normal
+SelectedCursor = default default reverse
TitleBar = cyan - bold+reverse
OrderBar = yellow - bold
@@ -44,6 +44,7 @@ SubmissionFlair = red - -
SubmissionSubreddit = yellow - -
SubmissionText = - - -
SubmissionTitle = - - bold
+SubmissionTitleSeen = - - -
Upvote = green - bold
Link = blue - underline
LinkSeen = magenta - underline
diff --git a/rtv/themes/molokai.cfg b/rtv/themes/molokai.cfg
index 0806d75..c55d8bb 100644
--- a/rtv/themes/molokai.cfg
+++ b/rtv/themes/molokai.cfg
@@ -23,9 +23,9 @@
[theme]
; =
-Normal = ansi_252 ansi_234 -
-Selected = - ansi_236 -
-SelectedCursor = - - bold+reverse
+Normal = ansi_252 ansi_234 normal
+Selected = ansi_252 ansi_236 normal
+SelectedCursor = ansi_252 ansi_234 bold+reverse
TitleBar = ansi_81 - bold+reverse
OrderBar = ansi_244 ansi_235 -
@@ -67,6 +67,7 @@ SubmissionFlair = ansi_197 - -
SubmissionSubreddit = ansi_222 - -
SubmissionText = - - -
SubmissionTitle = - - bold
+SubmissionTitleSeen = - - -
Upvote = ansi_154 - bold
Link = ansi_67 - underline
LinkSeen = ansi_141 - underline
diff --git a/rtv/themes/papercolor.cfg b/rtv/themes/papercolor.cfg
index 4c68793..7bea410 100644
--- a/rtv/themes/papercolor.cfg
+++ b/rtv/themes/papercolor.cfg
@@ -21,9 +21,9 @@
[theme]
; =
-Normal = ansi_238 ansi_255 -
-Selected = - ansi_254 -
-SelectedCursor = - - bold+reverse
+Normal = ansi_238 ansi_255 normal
+Selected = ansi_238 ansi_254 normal
+SelectedCursor = ansi_238 ansi_255 bold+reverse
TitleBar = ansi_24 - bold+reverse
OrderBar = ansi_25 - bold
@@ -65,6 +65,7 @@ SubmissionFlair = ansi_162 - bold
SubmissionSubreddit = ansi_166 - bold
SubmissionText = - - -
SubmissionTitle = - - bold
+SubmissionTitleSeen = - - -
Upvote = ansi_28 - bold
Link = ansi_24 - underline
LinkSeen = ansi_91 - underline
diff --git a/rtv/themes/solarized-dark.cfg b/rtv/themes/solarized-dark.cfg
index c75d149..049f951 100644
--- a/rtv/themes/solarized-dark.cfg
+++ b/rtv/themes/solarized-dark.cfg
@@ -19,9 +19,9 @@
[theme]
; =
-Normal = ansi_244 ansi_234 -
-Selected = - ansi_235 -
-SelectedCursor = - ansi_235 bold+reverse
+Normal = ansi_244 ansi_234 normal
+Selected = ansi_244 ansi_235 normal
+SelectedCursor = ansi_244 ansi_235 bold+reverse
TitleBar = ansi_37 - bold+reverse
OrderBar = ansi_245 - bold
@@ -34,10 +34,10 @@ NoticeError = ansi_160 - bold
NoticeSuccess = ansi_64 - bold
CursorBlock = ansi_240 - -
-CursorBar1 = ansi_125 - bold
-CursorBar2 = ansi_160 - bold
-CursorBar3 = ansi_61 - bold
-CursorBar4 = ansi_37 - bold
+CursorBar1 = ansi_125 - -
+CursorBar2 = ansi_160 - -
+CursorBar3 = ansi_61 - -
+CursorBar4 = ansi_37 - -
CommentAuthor = ansi_33 - bold
CommentAuthorSelf = ansi_64 - bold
@@ -63,6 +63,7 @@ SubmissionFlair = ansi_160 - -
SubmissionSubreddit = ansi_166 - -
SubmissionText = - - -
SubmissionTitle = ansi_245 - bold
+SubmissionTitleSeen = - - -
Upvote = ansi_64 - bold
Link = ansi_33 - underline
LinkSeen = ansi_61 - underline
diff --git a/rtv/themes/solarized-light.cfg b/rtv/themes/solarized-light.cfg
index 668a47b..057e880 100644
--- a/rtv/themes/solarized-light.cfg
+++ b/rtv/themes/solarized-light.cfg
@@ -19,9 +19,9 @@
[theme]
; =
-Normal = ansi_241 ansi_230 -
-Selected = - ansi_254 -
-SelectedCursor = - ansi_254 bold+reverse
+Normal = ansi_241 ansi_230 normal
+Selected = ansi_241 ansi_254 normal
+SelectedCursor = ansi_241 ansi_254 bold+reverse
TitleBar = ansi_37 - bold+reverse
OrderBar = ansi_245 - bold
@@ -34,10 +34,10 @@ NoticeError = ansi_160 - bold
NoticeSuccess = ansi_64 - bold
CursorBlock = ansi_245 - -
-CursorBar1 = ansi_125 - bold
-CursorBar2 = ansi_160 - bold
-CursorBar3 = ansi_61 - bold
-CursorBar4 = ansi_37 - bold
+CursorBar1 = ansi_125 - -
+CursorBar2 = ansi_160 - -
+CursorBar3 = ansi_61 - -
+CursorBar4 = ansi_37 - -
CommentAuthor = ansi_33 - bold
CommentAuthorSelf = ansi_64 - bold
@@ -63,6 +63,7 @@ SubmissionFlair = ansi_160 - bold
SubmissionSubreddit = ansi_166 - bold
SubmissionText = - - -
SubmissionTitle = ansi_240 - bold
+SubmissionTitleSeen = - - -
Upvote = ansi_64 - bold
Link = ansi_33 - underline
LinkSeen = ansi_61 - underline
diff --git a/setup.py b/setup.py
index 37827d8..aa8a39f 100644
--- a/setup.py
+++ b/setup.py
@@ -59,7 +59,7 @@ setuptools.setup(
'rtv.packages.praw'
],
package_data={
- 'rtv': ['templates/*'],
+ 'rtv': ['templates/*', 'themes/*'],
'rtv.packages.praw': ['praw.ini']
},
data_files=[("share/man/man1", ["rtv.1"])],
diff --git a/tests/conftest.py b/tests/conftest.py
index 2146b98..69e371d 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -40,7 +40,7 @@ for name in ['vcr.matchers', 'vcr.stubs']:
def pytest_addoption(parser):
parser.addoption('--record-mode', dest='record_mode', default='none')
parser.addoption('--refresh-token', dest='refresh_token',
- default='~/.config/rtv/refresh-token')
+ default='~/.local/share/rtv/refresh-token')
class MockStdscr(mock.MagicMock):
diff --git a/tests/test_theme.py b/tests/test_theme.py
index 94cd3c4..1c59b7e 100644
--- a/tests/test_theme.py
+++ b/tests/test_theme.py
@@ -102,7 +102,11 @@ def test_theme_element_selected_attributes():
# the ones defined in "Selected". Because "Selected" defines
# a foreground and a background color, they will override the
# ones that "Link" had defined.
- assert theme.elements['@Link'] == (2, 3, curses.A_REVERSE)
+ # assert theme.elements['@Link'] == (2, 3, curses.A_REVERSE)
+
+ # I can't remember why the above rule was implemented, so I reverted it
+ assert theme.elements['@Link'] == (5, 3, curses.A_REVERSE)
+
assert '@Normal' not in theme.elements
assert '@Selected' not in theme.elements
assert '@TitleBar' not in theme.elements