Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fltk-rs/fltk-term
A minimal fltk terminal widget
https://github.com/fltk-rs/fltk-term
Last synced: about 2 months ago
JSON representation
A minimal fltk terminal widget
- Host: GitHub
- URL: https://github.com/fltk-rs/fltk-term
- Owner: fltk-rs
- License: mit
- Created: 2023-10-20T22:40:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-04T12:22:47.000Z (about 1 year ago)
- Last Synced: 2024-08-08T22:54:23.169Z (5 months ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fltk-term
The fltk-term terminal is quite minimal, supports a limited subset of ansi escape sequences using [vte](https://github.com/alacritty/vte), i.e. don't expect to run vim in it!, and is powered by [portable-pty](https://github.com/wez/wezterm/pty).
## Known issues
- On Windows, the terminal defaults to cmd. More ansi escape sequences need to be handled to support powershell.## Usage
```rust
use fltk_term::PPTerm;
use fltk::{prelude::*, *};fn main() {
let a = app::App::default();
let mut w = window::Window::default().with_size(600, 400);
let term = PPTerm::default().size_of_parent();
w.end();
w.show();app::add_timeout3(0.2, move |_| {
term.write_all(r#"echo -e "\033[1;31mHELLO""#.as_bytes()).unwrap();
term.write_all(b"\n").unwrap();
});a.run().unwrap();
}
```