iced_term
Terminal emulator widget powered by ICED framework and alacritty terminal backend.
Features
The widget is currently under development and does not provide full terminal features make sure that widget is covered everything you want.
- PTY content rendering
- Multiple instance support
- Basic keyboard input
- Adding custom keyboard or mouse bindings
- Resizing
- Scrolling
- Focusing
- Selecting
- Changing Font/Color scheme
- Hyperlinks processing (hover/open)
This widget tested on MacOS and Linux and is not tested on Windows.
Installation
= "0.3.0"
Overview
Interacting with the widget is happened via:
Commands - you can send commands to widget for changing the widget state.
Events - widget is produced some events that can be handled in application. Every event has the first u64 argument that is terminal instance id.
Right now there is the only internal CommandReceived event that is needed for backend <-> view communication. You can also handle this event unwrap the command and process command additionally if you want.
Actions - widget's method update(&mut self, cmd: Command) returns Action that you can handle after widget updated.
For creating workable widget instance you need to do a few steps:
Add widget to your app struct
Create pure instance in app constructor
Add message that contained widget events to application message enum
Add IcedTermEvent processing to application update method
Add view to your application
Activate backend events subscription in your app
Make main func
Run your application
cargo run --release
Examples
You can also look at examples directory for more information about widget using.
- full_screen - The basic example of terminal emulator.
- split_view - The example based on split_view iced widget that show how multiple instance feature work.
- custom_bindings - The example that show how you can add custom keyboard or mouse bindings to your terminal emulator app.
- themes - The example that show how you can change terminal color scheme.
- fonts - The examples that show how you can change font type or font size in your terminal emulator app.