diff --git a/THEMES.md b/THEMES.md new file mode 100644 index 0000000..481d79a --- /dev/null +++ b/THEMES.md @@ -0,0 +1,129 @@ +# 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. + +## Usage + +Use the ``--theme`` flag to select a theme: + +```bash +$ rtv --theme=papercolor +``` + +You can also view a list of built-in and installed themes by using 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] +``` + +Custom themes can be installed by copying them into the **{HOME}/.config/rtv/themes/** folder. + +RTV allows you to cycle through themes using the F2 & F3 keys. +This can be used to quickly preview the different options. + +## Preview + + + + + + + + + + + + + + +
+ Default +

This theme is designed to work with the terminal's preset 16 color palette

+ +
+ Monochrome +

This theme is a fallback for terminals that don't support colors

+ +
+ Solarized Dark + + + Solarized Light + +
+ Papercolor + + + Molokai + +
+ +## Designing a theme + +``` +[theme] +; = +Normal = default default - +Selected = - - - +SelectedCursor = - - reverse + +TitleBar = cyan - bold+reverse +OrderBar = yellow - bold +OrderBarHighlight = yellow - bold+reverse +HelpBar = cyan - bold+reverse +Prompt = cyan - bold+reverse +NoticeInfo = - - bold +NoticeLoading = - - bold +NoticeError = - - bold +NoticeSuccess = - - bold + +CursorBlock = - - - +CursorBar1 = magenta - - +CursorBar2 = cyan - - +CursorBar3 = green - - +CursorBar4 = yellow - - + +CommentAuthor = blue - bold +CommentAuthorSelf = green - bold +CommentCount = - - - +CommentText = - - - +Created = - - - +Downvote = red - bold +Gold = yellow - bold +HiddenCommentExpand = - - bold +HiddenCommentText = - - - +MultiredditName = yellow - bold +MultiredditText = - - - +NeutralVote = - - bold +NSFW = red - bold+reverse +Saved = green - - +Score = - - - +Separator = - - bold +Stickied = green - - +SubscriptionName = yellow - bold +SubscriptionText = - - - +SubmissionAuthor = green - bold +SubmissionFlair = red - - +SubmissionSubreddit = yellow - - +SubmissionText = - - - +SubmissionTitle = - - bold +Upvote = green - bold +Link = blue - underline +LinkSeen = magenta - underline +UserFlair = yellow - bold +``` diff --git a/rtv/theme.py b/rtv/theme.py index 22ea0a8..f206563 100644 --- a/rtv/theme.py +++ b/rtv/theme.py @@ -318,7 +318,7 @@ class Theme(object): This is intended to be used as a command-line utility, outside of the main curses display loop. """ - themes, errors = cls.list_themes(path=path) + themes, errors = cls.list_themes(path=path + '/') print('\nInstalled ({0}):'.format(path)) installed = [t for t in themes if t.source == 'installed']