1 # Richterm 2 3 Richterm is a textual interface with support for links, different fonts, 4 and customizable menu. 5 6 # Interface 7 8 Processes can interact with richterm either by writing and reading to 9 `/dev/cons`, or by working with its file system, mounted over at 10 `/mnt/richterm`. 11 12 `/cons` is provided for backwards-compatibilty, text written here 13 will appear on screen as one would expect. 14 15 `/text` expects specially formatted text to present on screen. 16 17 `/ctl` will return events, such as menu hits or link follows. 18 19 Content of `/menu` file will appear in the right-click menu. 20 21 # Format 22 23 `/text` is parsed on line-by-line basis, with first character 24 being treated as command and rest as argument. 25 26 ## Commands 27 28 - '.' - print text 29 - 'n' - print new line 30 - 't' - print tab 31 - 's' - print space 32 - 'l' - set link 33 - 'f' - set font 34 35 For 'n', 't', and 's' argument is ignored and should be empty. 36 For 'l' and 'f' empty argument will unset the parameter. 37 38 # Usage 39 40 Left mouse button is used for selecting text. 41 42 Middle-click menu provides operations on selected text. 43 44 Right-click menu combines link operations (Follow, Snarf, Plumb) 45 and user menu managed by `/menu` file. 46 47 On launch `richterm` will start `/bin/richrc` script by default. 48 It handles richterm's link and menu events and tries to open links 49 in appropriate programs or sends them to plumber. 50 51 For now, following programs are provided: 52 53 - `Dir` prints direcrory listing, supplied with appropriate link for every line. 54 - `Markdown` prints [markdown](https://daringfireball.net/projects/markdown/)-formatted files. 55 - `Gopher` prints gopher menus and text files from supplied gopher URL. 56 - `Gemini` does the same for gemini URLs. 57 58 In addition, `richrc` manages primitive link history via 'Back' option in 59 user menu. 60 61 # Installation 62 63 The usual `mk install` invocation will install richterm binary 64 into `/$objtype/bin directory` and extra binaries and scripts into 65 `/sys/lib/richterm/bin/...` directories. 66 67 `/sys/lib/richterm/bin/...` will be bound over `/bin` by richterm 68 on launch automatically.