From 096515593583e13b2c4b2e69519eaa0b1c058e7e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 31 Mar 2024 12:15:05 +0530 Subject: [PATCH] Make the scrollback indicator visible by default --- docs/changelog.rst | 3 ++- docs/overview.rst | 7 +++++-- kitty/options/definition.py | 6 +++--- kitty/options/types.py | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 17d470c11..08cc7343e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -54,7 +54,8 @@ Detailed list of changes using the panel kitten for all compositors that support the requisite Wayland protocol which is practically speaking all of them but GNOME (:pull:`2590`) -- A new option :opt:`scrollback_indicator_opacity` to show a small indicator on the right hand side of the screen of how much you have scrolled +- Show a small :opt:`scrollback indicator ` along the right window edge when viewing + the scrollback to keep track of scroll position (:iss:`2502`) - Wayland: Support fractional scales so that there is no wasted drawing at larger scale followed by resizing in the compositor diff --git a/docs/overview.rst b/docs/overview.rst index 54f230801..345a2e9b2 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -251,8 +251,11 @@ The scrollback buffer ----------------------- |kitty| supports scrolling back to view history, just like most terminals. You -can use either keyboard shortcuts or the mouse scroll wheel to do so. However, -|kitty| has an extra, neat feature. Sometimes you need to explore the scrollback +can use either keyboard shortcuts or the mouse scroll wheel to do so. While +you are browsing the scrollback a :opt:`small indicator ` +is displayed along the right edge of the window to show how far back you are. + +However, |kitty| has an extra, neat feature. Sometimes you need to explore the scrollback buffer in more detail, maybe search for some text or refer to it side-by-side while typing in a follow-up command. |kitty| allows you to do this by pressing the :sc:`show_scrollback` shortcut, which will open the scrollback buffer in diff --git a/kitty/options/definition.py b/kitty/options/definition.py index 07ec9dc18..9c6acd0f0 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -374,12 +374,12 @@ is changed it will only affect newly created windows, not existing ones. ''' ) -opt('scrollback_indicator_opacity', '0.0', +opt('scrollback_indicator_opacity', '1.0', option_type='unit_float', ctype='float', long_text=''' The opacity of the scrollback indicator which is a small colored rectangle that moves along the right hand side of the window as you scroll, indicating what fraction you -have scrolled. The default is zero which means fully transparent, aka invisible. -Set to a value between zero and one to see the indicator.''') +have scrolled. The default is one which means fully opaque, aka visible. +Set to a value between zero and one to make the indicator less visible.''') opt('scrollback_pager', 'less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER', diff --git a/kitty/options/types.py b/kitty/options/types.py index 9c2bdf3f0..94e4b67db 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -563,7 +563,7 @@ class Options: resize_debounce_time: typing.Tuple[float, float] = (0.1, 0.5) resize_in_steps: bool = False scrollback_fill_enlarged_window: bool = False - scrollback_indicator_opacity: float = 0 + scrollback_indicator_opacity: float = 1.0 scrollback_lines: int = 2000 scrollback_pager: typing.List[str] = ['less', '--chop-long-lines', '--RAW-CONTROL-CHARS', '+INPUT_LINE_NUMBER'] scrollback_pager_history_size: int = 0