diff options
author | bptato <nincsnevem662@gmail.com> | 2021-11-20 19:22:36 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2021-11-20 19:22:36 +0100 |
commit | fae6b15f8fe7d59caa61b2295e6b71d89b70a795 (patch) | |
tree | 51ed366543ee9454c1d2ee94c8849c49353f13ba /doc | |
parent | c7347c46b6bbce1194849ae5c8612b17b2b396ed (diff) | |
download | chawan-fae6b15f8fe7d59caa61b2295e6b71d89b70a795.tar.gz |
Bugfixes & documentation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/config.md | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/doc/config.md b/doc/config.md new file mode 100644 index 00000000..14a34608 --- /dev/null +++ b/doc/config.md @@ -0,0 +1,97 @@ +# Configuration + +Currently keybindings and a user stylesheet can be configured. + +twt will look for a config file in the ~/.config/twt/ directory, so you can +just copy the one from res/ there and customize that to your liking. + +A list of configurable options follows. + +## Stylesheets + +To set a user stylesheet, use the format `stylesheet "path-to-user.css"`. +Relative paths are interpreted as relative to the config directory. + +For now, specifying a second stylesheet will override the first one. + +## Keybindings +"Normal" (default pager browsing) mode keybindings are configured using the +syntax + + nmap <keybinding> <action> + +Similarly, "Line-edit" (line editing) mode keybindings are configured +using the syntax + + lemap <keybinding> <action> + +Where `<keybinding>` is a combination of unicode characters with or without +modifiers. Modifiers are the prefixes `C-` and `M-`, which add control or +escape to the keybinding respectively (essentially making `M-` the same as +`C-[`). + +`<action>` is a valid normal or line-edit mode action. A detailed +description of these follows. + +### Normal mode actions + +<table> +<tr><th>**Name**<th>**Function** +<tr><td>`NULL`<td>Do nothing +<tr><td>`QUIT`<td>Exit the browser +<tr><td>`CURSOR_UP`<td>Move the cursor to the previous line +<tr><td>`CURSOR_DOWN`<td>Move cursor to the next line +<tr><td>`CURSOR_LEFT`<td>Move cursor to the previous cell +<tr><td>`CURSOR_RIGHT`<td>Move cursor to the next cell +<tr><td>`CURSOR_LEFT`<td>Move cursor to the previous cell +<tr><td>`CURSOR_LINEBEGIN`<td>Move cursor to the first cell of the line +<tr><td>`CURSOR_LINEEND`<td>Move cursor to the last cell of the line +<tr><td>`CURSOR_NEXT_WORD`<td>Move cursor to the beginning of the next word +<tr><td>`CURSOR_PREV_WORD`<td>Move cursor to the end of the previous word +<tr><td>`CURSOR_NEXT_LINK`<td>Move cursor to the beginning of the next clickable element +<tr><td>`CURSOR_PREV_LINK`<td>Move cursor to the beginning of the previous clickable element +<tr><td>`PAGE_DOWN`<td>Move screen down by one page +<tr><td>`PAGE_UP`<td>Move screen up by one page +<tr><td>`PAGE_LEFT`<td>Move screen to the left by one page +<tr><td>`PAGE_RIGHT`<td>Move screen to the right by one page +<tr><td>`HALF_PAGE_DOWN`<td>Move screen down by half a page +<tr><td>`HALF_PAGE_UP`<td>Move screen up by half a page +<tr><td>`SCROLL_DOWN`<td>Move screen down by one line +<tr><td>`SCROLL_UP`<td>Move screen up by one line +<tr><td>`SCROLL_LEFT`<td>Move screen to the left by one line +<tr><td>`SCROLL_RIGHT`<td>Move screen to the right by one line +<tr><td>`CLICK`<td>Click element currently under cursor +<tr><td>`CHANGE_LOCATION`<td>Go to URL +<tr><td>`RELOAD`<td>Reload page +<tr><td>`RESHAPE`<td>Reshape buffer (=render page anew) +<tr><td>`REDRAW`<td>Redraw buffer (=redraw screen) +<tr><td>`TOGGLE_SOURCE`<td>Source view +<tr><td>`CURSOR_FIRST_LINE`<td>Move cursor to the first line of the buffer +<tr><td>`CURSOR_LAST_LINE`<td>Move cursor to the last line of the buffer +<tr><td>`CURSOR_TOP`<td>Move cursor to the first line of the page +<tr><td>`CURSOR_MIDDLE`<td>Move cursor to the middle of the page +<tr><td>`CURSOR_BOTTOM`<td>Move cursor to the last line of the page +<tr><td>`CENTER_LINE`<td>Center screen around line +<tr><td>`LINE_INFO`<td>Display information about line +</table> + +### Line-edit mode actions + +<table> +<tr><th>**Name**<th>**Function** +<tr><td>`NULL`<td>Do nothing +<tr><td>`SUBMIT`<td>Submit line +<tr><td>`CANCEL`<td>Cancel operation +<tr><td>`BACKSPACE`<td>Delete character before cursor +<tr><td>`DELETE`<td>Delete character after cursor +<tr><td>`CLEAR`<td>Clear text before cursor +<tr><td>`KILL`<td>Clear text after cursor +<tr><td>`KILL_WORD`<td>Delete previous word +<tr><td>`BACK`<td>Move cursor back by one character +<tr><td>`FORWARD`<td>Move cursor forward by one character +<tr><td>`PREV_WORD`<td>Move cursor to the previous word by one character +<tr><td>`NEXT_WORD`<td>Move cursor to the previous word by one character +<tr><td>`BEGIN`<td>Move cursor to the previous word by one character +<tr><td>`END`<td>Move cursor to the previous word by one character +<tr><td>`ESC`<td>Ignore keybindings for next character +</table> |