blob: bb804d58219560cb32154d968943606c987fc22f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# hare-libtui
This package provides widgets and various functions for creating a tui
(terminal user interface).
This currently mostly provides a scrollable list widget with truncated width and various functions to init the ui, print the ui, add listeners, scan a rune, suspend/resume the TUI, clear the screen, etc.
For a messy but functional example of this library's usage see: https://git.sr.ht/~ark/ilhare
**Status**: Incomplete
## Provided modules
- **libtui**: main ui functions and initialization
- **libtui::layout**: common functions for widget containers
- **libtui::vlayout**: widget container focused on vertical layouts (incomplete, untested)
- **libtui::widget**: common functions and types for all widgets
- **libtui::widget::list**: scrollable width-truncated list widget with relevant functions for navigation and selection
- **libtui::widget::ed**: a text editor widget (incomplete, untested)
## Dependencies
- hare-wcwidth: https://git.sr.ht/~ark/hare-wcwidth
- hare-set: https://git.sr.ht/~ark/hare-set
## Installation
### System-wide installation
```
make install
```
To generate html docs:
```
make docs
```
### Vendoring
```
git subtree -P vendor/hare-libtui/ add https://git.sr.ht/~ark/hare-libtui master
```
|