From faddcd34d28683b004fdc01814126706081939e0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Jun 2018 23:13:27 +0530 Subject: [PATCH] More conf docs --- kitty/config.py | 3 --- kitty/config_data.py | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/kitty/config.py b/kitty/config.py index e319ac2e2..c64b6b6d6 100644 --- a/kitty/config.py +++ b/kitty/config.py @@ -337,8 +337,6 @@ url_style.map = dict( type_map = { 'allow_remote_control': to_bool, - 'scrollback_lines': positive_int, - 'scrollback_pager': to_cmdline, 'open_url_with': to_cmdline, 'focus_follows_mouse': to_bool, 'open_url_modifiers': to_modifiers, @@ -351,7 +349,6 @@ type_map = { 'window_margin_width': positive_float, 'tab_bar_margin_width': positive_float, 'window_padding_width': positive_float, - 'wheel_scroll_multiplier': float, 'visual_bell_duration': positive_float, 'enable_audio_bell': to_bool, 'click_interval': positive_float, diff --git a/kitty/config_data.py b/kitty/config_data.py index d9047b0c4..4b29c5506 100644 --- a/kitty/config_data.py +++ b/kitty/config_data.py @@ -6,7 +6,7 @@ from gettext import gettext as _ from .conf.definition import option_func -from .conf.utils import positive_float, to_color +from .conf.utils import positive_float, positive_int, to_cmdline, to_color from .fast_data_types import CURSOR_BEAM, CURSOR_BLOCK, CURSOR_UNDERLINE MINIMUM_FONT_SIZE = 4 @@ -60,6 +60,10 @@ o, g, all_groups = option_func(all_options, { 'cursor': [ _('Cursor customization'), ], + + 'scrollback': [ + _('Scrollback'), + ], }) type_map = {o.name: o.option_type for o in all_options.values()} @@ -142,3 +146,19 @@ seconds of keyboard inactivity. Set to zero to never stop blinking. o('cursor_stop_blinking_after', 15.0, option_type=positive_float) # }}} + +g('scrollback') # {{{ + +o('scrollback_lines', 2000, _('Scrollback size'), option_type=positive_int, long_text=_(''' +Number of lines of history to keep in memory for scrolling back. Memory is allocated +on demand.''')) + +o('scrollback_pager', 'less +G -R', _('Scrollback pager'), option_type=to_cmdline, long_text=_(''' +Program with which to view scrollback in a new window. The scrollback buffer is +passed as STDIN to this program. If you change it, make sure the program you +use can handle ANSI escape sequences for colors and text formatting.''')) + +o('wheel_scroll_multiplier', 5.0, _('Wheel/touchpad scrolling'), long_text=_(''' +Wheel scroll multiplier (modify the amount scrolled by the mouse wheel). Use +negative numbers to change scroll direction.''')) +# }}}