Files
jprototerm/README.md
2026-05-28 13:53:44 +02:00

83 lines
1.9 KiB
Markdown

# jprototerm
JavaFX canvas terminal prototype using `jlibghostty` for terminal emulation, Nix for the build environment, and GluonFX/GraalVM Native Image for the Linux binary.
## Build
```sh
nix build
```
The package build uses GluonFX through Gradle so JavaFX native-image metadata is generated by the toolchain that is designed for it. In a strict pure Nix sandbox, Gradle dependencies must be vendored first with `gradle2nix` or a checked-in Maven/Gradle cache.
For development:
```sh
nix develop
gradle -PjlibghosttyMavenRepo="$JLIBGHOSTTY_MAVEN_REPO" run
gradle -PjlibghosttyMavenRepo="$JLIBGHOSTTY_MAVEN_REPO" -Pgluonfx.mainClassName=com.gregor.jprototerm.Main nativeExecutable
```
The Gradle project is the source of truth for native JavaFX builds.
## Config
Configuration is read from:
```text
$XDG_CONFIG_HOME/jprototerm/config.toml
```
If `XDG_CONFIG_HOME` is unset, the fallback is:
```text
$HOME/.config/jprototerm/config.toml
```
If no config file exists, jprototerm writes the default config on startup.
Example, also available in `config.example.toml`:
```toml
[terminal]
columns = 100
rows = 30
shell = "/bin/bash"
font_family = "JetBrainsMono Nerd Font"
font_size = 15
[window]
width = 1200
height = 760
[kitty_graphics]
enabled = true
[scrollback]
editor_command = "vi {file}"
[keybindings]
navigate_left = "ALT+H"
navigate_down = "ALT+J"
navigate_up = "ALT+K"
navigate_right = "ALT+L"
toggle_floating = "ALT+F"
new_floating = "ALT+SHIFT+F"
next_floating = "ALT+F12"
close_pane = "ALT+X"
open_font_selector = "ALT+T"
open_scrollback = "ALT+S"
```
## Defaults
- `Alt+h/j/k/l`: navigate panes
- `Alt+f`: show or hide all floating panes
- `Alt+Shift+f`: create a new floating pane
- `Alt+F12`: cycle floating panes
- `Alt+x`: close the active floating pane
- `Alt+t`: open the font selector
- `Alt+s`: open the active pane scrollback in `$EDITOR`
- Font default: `JetBrainsMono Nerd Font`
- Kitty graphics protocol parsing is enabled by default