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

Scrolling in help screen #1577

Open
Explorer09 opened this issue Jan 1, 2025 · 0 comments
Open

Scrolling in help screen #1577

Explorer09 opened this issue Jan 1, 2025 · 0 comments
Labels
documentation 📖 Improvements or additions to documentation new feature Completely new feature

Comments

@Explorer09
Copy link
Contributor

With a lot of features added into htop over time, htop's help screen (the screen you see when you press the h or F1 key) is already unable to present all its contents into the 80×24 screen size that most terminal emulators still use by default.

The current (as of 2025-01-01) htop help screen requires at least 32 lines to display:
htop-help-screen-80x32

This feature request is useful for new people who can contribute to htop.

As the hotkeys in htop will likely be more, not less over time, it might be a good time to make htop help screen scrollable now. And perhaps ideally, adapted to different terminal screen sizes (some screens in embedded systems can be very small).

Goals

  • Allow htop help screen to scroll, with the minimum support of Up, Down, PageUp, PageDown, and Space keys.
  • Space key behavior changed from exiting the help screen to scrolling the help screen down by one page. If the scrolling window is at the bottom of the help page, the Space key will exit the help screen. (The Enter key can have identical behavior.)
  • q and Escape keys will exit the help screen.
  • I can't tell we need horizontal scrolling at this time, but help screen needing horizontal scrolling would be bad in usability, so I don't say Left or Right key as part of the goals.

Secondary goals

  • Add a Function Bar at the bottom of the terminal screen, explaining the keys that can be used to scroll. The items on the Function Bar should have a minimum of these:
PgUp  PgDnScrollEscDone
    --    ------   ------
  • The Function Bar should ideally allow mouse clicks.

Tertiary goals (not really necessary but it's good to have it nevertheless)

  • Make the list of hotkeys shown in help screen adaptable to smaller screen sizes. Currently it's two columns, but on a smaller screen, make it able to display as one column instead. This may require reorganization of the hotkey items, thus it's not an easy task to be done.
@BenBE BenBE added documentation 📖 Improvements or additions to documentation new feature Completely new feature labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📖 Improvements or additions to documentation new feature Completely new feature
Projects
None yet
Development

No branches or pull requests

2 participants