# rdice-tui
`rdice-tui` is a terminal UI for persistent dice trays. It supports repeated
tray rolling, slot locking, custom dice management, and compact keyboard-driven
operation.
## Install
```sh
cargo install rdice-tui
```
## Usage
```sh
rdice-tui
```
The state path can be overridden with `RDICE_TUI_STATE_PATH`; otherwise it uses:
```text
~/.local/state/rdice-tui/state.toml
```
The TUI uses terminal colors by default. Set `NO_COLOR` to disable colored
styles.
## Keys
Overview:
```text
1-9 select/deselect tray on the current page
o<num> open tray detail
r roll selected trays
t show/hide text results
R show/hide range annotations
E show/hide expected value annotations
h show roll history
m open tray manager
c open custom dice manager
PgUp/PgDn change page
: command mode
q quit
```
Tray detail:
```text
r roll current tray
l<num> lock/unlock slot
d<num> remove slot
a add die
h show roll history
m/c open custom dice manager
Esc return to overview
: command mode
```
Custom dice manager:
```text
n guided new die: name -> face count -> face 1...
d<num> delete custom die
e<num> edit custom die command
Esc return
```
Command mode shows `COMMAND:` in the footer. Press `Enter` to apply the command
or `Esc` to cancel it.
Commands:
```text
:manager dice
:manager trays
:history
:dice new fate -1 0 +
:dice delete fate
:dice edit fate -1 0 1
:tray new combat
:tray delete combat
:tray rename combat battle
```
## License
Licensed under the MIT License.