ratatui-splash-screen
A Ratatui widget to turn any image to a splash screen in your terminal ✨
See the demo of gpg-tui for a real world example.
Features
- Turn any image (
jpg,png) into a splash screen! - Verifies the file integrity via checking SHA checksum (optional)
- Supports grayscaling
Installation
cargo add ratatui ratatui-splash-screen
Usage
Create a SplashConfig and construct a SplashScreen widget with it.
Then render the widget in a loop using the render function.
You can check if the splash screen is done rendering by calling is_rendered.
Examples
use Error;
use stdout;
use Duration;
use *;
use ;
static SPLASH_CONFIG: SplashConfig = SplashConfig ;
See the full example here.
Tips
- Use small images (such as 200x200) for a better experience.
- You can tweak the
render_stepsvalue for smoother rendering. - Run
sha256sum(1)command on your system to find out the SHA value. You can set it toNoneif you don't want to check integrity.
Contributing
See the contribution guidelines.
License
Licensed under either of Apache License Version 2.0 or The MIT License at your option.
🦀 ノ( º _ º ノ) - respect crables!
Copyright
Copyright © 2024, Orhun Parmaksız