Skip to content

Commit

Permalink
[guide] colour unwritten guides grey
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Nov 25, 2023
1 parent 38dcfd8 commit 6a88c0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions visidata/guide.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
'''
# A Guide to VisiData Guides
Each guide shows you how to use a particular feature in VisiData.
Each guide shows you how to use a particular feature in VisiData. Gray guides have not been written yet. Why not contribute one?
[:keys]Up/Down[/] to move the row cursor
[:keys]Enter[/] to view a topic
[:keys]Backspace[/] to come back to this list of guides
- [:keystrokes]Up/Down[/] to move the row cursor
- [:keystrokes]Enter[/] to view a topic
- [:keystrokes]Backspace[/] to come back to this list of guides
'''

import re

from visidata import vd, BaseSheet, Sheet, ItemColumn, Column, VisiData, ENTER
from visidata import vd, BaseSheet, Sheet, ItemColumn, Column, VisiData, ENTER, RowColorizer
from visidata import wraptext

vd.guides = {} # guidename -> guideobj
Expand All @@ -28,6 +28,9 @@ class GuideGuide(Sheet):
Column('points', type=int, getter=lambda c,r: 0),
Column('max_points', type=int, getter=lambda c,r: 100),
]
colorizers = [
RowColorizer(7, 'color_guide_dne', lambda s,c,r,v: r and r[1] not in vd.guides)
]
def iterload(self):
i = 0
for line in '''
Expand Down
1 change: 1 addition & 0 deletions visidata/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
vd.theme_option('color_clickable', 'underline', 'color of internally clickable item')
vd.theme_option('color_code', 'bold white on 237', 'color of code sample')
vd.theme_option('color_h1', 'bold 200', 'color of h1 header')
vd.theme_option('color_guide_unwritten', '243 on black', 'color of unwritten guides in GuideGuide')

vd.theme_option('force_256_colors', False, 'use 256 colors even if curses reports fewer')

Expand Down

0 comments on commit 6a88c0b

Please # to comment.