Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[color-] make status colors more readable #2373

Merged
merged 4 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions visidata/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class OptionHelpGetter:
'For easy and consistent formatting in sidebars and helpstrings, use {help.options.opt_name}.'
def __getattr__(self, optname):
opt = vd.options._get(optname, 'default')
return f'[:onclick options-sheet {optname}][:longname]{optname}[/][/]: {opt.helpstr} (default: {opt.value})'
return f'[:onclick options-sheet {optname}][:longname_guide]{optname}[/][/]: {opt.helpstr} (default: {opt.value})'


class CommandHelpGetter:
Expand Down Expand Up @@ -149,7 +149,7 @@ def __getitem__(self, k):
binding += f'[:45] {inputtype}[/]'

helpstr = cmd.helpstr
return f'[:keys]{binding}[/] ([:longname]{longname}[/]) to {helpstr}'
return f'[:keys]{binding}[/] [:longname_guide]{longname}[/] to {helpstr}'


class GuideSheet(Sheet):
Expand Down
2 changes: 1 addition & 1 deletion visidata/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def drawSidebarText(sheet, scr, text:Union[None,str,'HelpPane'], title:str='', o
x = max(0, w-titlew-6)
clipdraw(sidebarscr, 0, x, f"|[:sidebar_title] {title} [:]|", cattr, w=titlew+4)
if bottommsg:
clipdraw(sidebarscr, h-1, winw-dispwidth(bottommsg)-4, '|'+bottommsg+'|[:]', cattr)
clipdraw(sidebarscr, h-1, winw-dispwidth(bottommsg)-4, '|'+bottommsg+'|', cattr)

sidebarscr.refresh()

Expand Down
5 changes: 3 additions & 2 deletions visidata/statusbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
from visidata import vd, VisiData, BaseSheet, Sheet, ColumnItem, Column, RowColorizer, options, colors, wrmap, clipdraw, ExpectedException, update_attr, dispwidth, ColorAttr


vd.option('disp_rstatus_fmt', '{sheet.threadStatus} {sheet.keystrokeStatus} [:longname]{sheet.longname}[/] {sheet.nRows:9d} {sheet.rowtype} {sheet.modifiedStatus}{sheet.selectedStatus}{vd.replayStatus}', 'right-side status format string')
vd.option('disp_rstatus_fmt', '{sheet.threadStatus} {sheet.keystrokeStatus} [:longname_status]{sheet.longname}[/] {sheet.nRows:9d} {sheet.rowtype} {sheet.modifiedStatus}{sheet.selectedStatus}{vd.replayStatus}', 'right-side status format string')
vd.option('disp_status_fmt', '{sheet.sheetlist}| ', 'left-side status format string')
vd.theme_option('disp_lstatus_max', 0, 'maximum length of left status line')
vd.theme_option('disp_status_sep', '│', 'separator between statuses')

vd.theme_option('color_keystrokes', 'bold white on 237', 'color of input keystrokes')
vd.theme_option('color_longname', '6', 'color of command longnames')
vd.theme_option('color_longname_guide', '6', 'color of command longnames')
vd.theme_option('color_longname_status', 'white', 'color of command longnames')
vd.theme_option('color_keys', 'bold', 'color of keystrokes in help')
vd.theme_option('color_status', 'bold on 238', 'status line color')
vd.theme_option('color_error', '202 1', 'error message color')
Expand Down
3 changes: 2 additions & 1 deletion visidata/themes/ascii8.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
color_top_status='underline',
color_active_status='black on cyan',
color_inactive_status='8 on black',
color_working='green',
color_working='bold white',
color_longname_status='black on cyan',

color_menu='black on cyan',
color_menu_active='yellow on black',
Expand Down
10 changes: 10 additions & 0 deletions visidata/themes/asciimono.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@
color_hidden_col='8',
color_selected_row='',
color_edit_cell='',
color_edit_unfocused='',
color_graph_hidden='',
color_graph_selected='bold',
color_status_replay='',
color_currency_neg='',
color_match='',
color_cmdpalette='',

color_graph_axis='bold',
color_sidebar='reverse',
Expand All @@ -69,6 +73,12 @@
color_active_status='reverse',
color_inactive_status='8',
color_working='',
color_longname='',
color_highlight_status='',
color_sidebar_title='',
color_heading='',
color_guide_unwritten='',
color_code='',

color_menu='reverse',
color_menu_active='',
Expand Down
Loading