Switching to more vim-inspired theme attributes
This commit is contained in:
@@ -304,22 +304,22 @@ class SubredditPage(Page):
|
||||
|
||||
n_title = len(data['split_title'])
|
||||
for row, text in enumerate(data['split_title'], start=offset):
|
||||
attr = self.term.attr('submission_title')
|
||||
attr = self.term.attr('SubmissionTitle')
|
||||
if row in valid_rows:
|
||||
self.term.add_line(win, text, row, 1, attr)
|
||||
|
||||
row = n_title + offset
|
||||
if row in valid_rows:
|
||||
if data['url_full'] in self.config.history:
|
||||
attr = self.term.attr('url_seen')
|
||||
attr = self.term.attr('LinkSeen')
|
||||
else:
|
||||
attr = self.term.attr('url')
|
||||
attr = self.term.attr('Link')
|
||||
self.term.add_line(win, '{url}'.format(**data), row, 1, attr)
|
||||
|
||||
row = n_title + offset + 1
|
||||
if row in valid_rows:
|
||||
|
||||
attr = self.term.attr('score')
|
||||
attr = self.term.attr('Score')
|
||||
self.term.add_line(win, '{score}'.format(**data), row, 1, attr)
|
||||
self.term.add_space(win)
|
||||
|
||||
@@ -327,52 +327,52 @@ class SubredditPage(Page):
|
||||
self.term.add_line(win, arrow, attr=attr)
|
||||
self.term.add_space(win)
|
||||
|
||||
attr = self.term.attr('created')
|
||||
attr = self.term.attr('Created')
|
||||
self.term.add_line(win, '{created}'.format(**data), attr=attr)
|
||||
|
||||
if data['comments'] is not None:
|
||||
attr = self.term.attr('separator')
|
||||
attr = self.term.attr('Separator')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, '-', attr=attr)
|
||||
|
||||
attr = self.term.attr('comment_count')
|
||||
attr = self.term.attr('CommentCount')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, '{comments}'.format(**data), attr=attr)
|
||||
|
||||
if data['saved']:
|
||||
attr = self.term.attr('saved')
|
||||
attr = self.term.attr('Saved')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, '[saved]', attr=attr)
|
||||
|
||||
if data['stickied']:
|
||||
attr = self.term.attr('stickied')
|
||||
attr = self.term.attr('Stickied')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, '[stickied]', attr=attr)
|
||||
|
||||
if data['gold']:
|
||||
attr = self.term.attr('gold')
|
||||
attr = self.term.attr('Gold')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, self.term.guilded, attr=attr)
|
||||
|
||||
if data['nsfw']:
|
||||
attr = self.term.attr('nsfw')
|
||||
attr = self.term.attr('NSFW')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, 'NSFW', attr=attr)
|
||||
|
||||
row = n_title + offset + 2
|
||||
if row in valid_rows:
|
||||
attr = self.term.attr('submission_author')
|
||||
attr = self.term.attr('SubmissionAuthor')
|
||||
self.term.add_line(win, '{author}'.format(**data), row, 1, attr)
|
||||
self.term.add_space(win)
|
||||
|
||||
attr = self.term.attr('submission_subreddit')
|
||||
attr = self.term.attr('SubmissionSubreddit')
|
||||
self.term.add_line(win, '/r/{subreddit}'.format(**data), attr=attr)
|
||||
|
||||
if data['flair']:
|
||||
attr = self.term.attr('submission_flair')
|
||||
attr = self.term.attr('SubmissionFlair')
|
||||
self.term.add_space(win)
|
||||
self.term.add_line(win, '{flair}'.format(**data), attr=attr)
|
||||
|
||||
attr = self.term.attr('cursor')
|
||||
attr = self.term.attr('CursorBlock')
|
||||
for y in range(n_rows):
|
||||
self.term.addch(win, y, 0, str(' '), attr)
|
||||
|
||||
Reference in New Issue
Block a user