browser: make scroll step a config value
This commit is contained in:
parent
16903190c8
commit
3a18ad3d77
|
@ -189,19 +189,19 @@ class Browser:
|
|||
elif char == ord("r"):
|
||||
self.reload_page()
|
||||
elif char == ord("h") or char == curses.KEY_LEFT:
|
||||
self.scroll_page_horizontally(-3)
|
||||
self.scroll_page_horizontally(-self.config["scroll_step"])
|
||||
elif char == ord("H"):
|
||||
self.scroll_whole_page_left()
|
||||
elif char == ord("j") or char == curses.KEY_DOWN:
|
||||
self.scroll_page_vertically(3)
|
||||
self.scroll_page_vertically(self.config["scroll_step"])
|
||||
elif char == ord("J") or char == curses.KEY_NPAGE:
|
||||
self.scroll_whole_page_down()
|
||||
elif char == ord("k") or char == curses.KEY_UP:
|
||||
self.scroll_page_vertically(-3)
|
||||
self.scroll_page_vertically(-self.config["scroll_step"])
|
||||
elif char == ord("K") or char == curses.KEY_PPAGE:
|
||||
self.scroll_whole_page_up()
|
||||
elif char == ord("l") or char == curses.KEY_RIGHT:
|
||||
self.scroll_page_horizontally(3)
|
||||
self.scroll_page_horizontally(self.config["scroll_step"])
|
||||
elif char == ord("L"):
|
||||
self.scroll_whole_page_right()
|
||||
elif char == ord("^"):
|
||||
|
|
|
@ -28,6 +28,7 @@ DEFAULT_CONFIG = {
|
|||
"-out", "{cert_path}",
|
||||
"-subj", "/CN={common_name}",
|
||||
],
|
||||
"scroll_step": 3,
|
||||
}
|
||||
|
||||
RENDER_MODES = ("fancy", "dumb")
|
||||
|
|
|
@ -69,6 +69,7 @@ Here are the available options:
|
|||
* home (string): home page.
|
||||
* render_mode (string): default render mode to use ("fancy" or "dumb").
|
||||
* generate_client_cert_command (see note 3): command to generate a client cert.
|
||||
* scroll_step (int): number of lines/columns to scroll in one step.
|
||||
|
||||
Notes:
|
||||
|
||||
|
|
Reference in a new issue