Expand description
§Yet Another Spinner Lib
§How to Use?
It’s as easy as pie (or maybe even easier, depending on your pie-making skills)! Just follow these simple steps:
§Spinner
// example/multi_spinner.rs
use zenity::spinner::{MultiSpinner, Frames};
let spinner = MultiSpinner::default();
let spinner1 = spinner.get_last();
let spinner2 = spinner.add(Frames::binary(false));
// start all spinners
spinner.run_all();
spinner.stop(&spinner2);
spinner.set_text(&spinner2, "Successfully".to_string());§Progress Bar
// examples/progress.rs
use zenity::progress::ProgressBar;
let progress = ProgressBar::default();
for loading in loading..=100 {
// do work...
progress.set(&progress.get_last(), &loading);
}
§Color Configuration
To configure the color output, you can use the --color option with one of the following values:
always: Enable color output regardless of the terminal type and capabilitiesauto: Automatically determine whether to enable color output based on the terminal type and capabilities. If stdout is a pipe or if the terminal doesn’t support colors, colors will be disablednever: Disable color output
Note: If the stdout is a pipe or if the terminal doesn’t support colors, colors will be automatically disabled
Check out the examples for more
§Feature Requests and Bug Reports
If you have any ideas for new features or encounter any bugs while using Zenity, please don’t hesitate to open an issue on GitHub. Your feedback is valuable and will help improve the library for everyone.
Modules§
- Mod for color related methods
- mod for progress bars
- Module for multiline spinners
- Collection of helper functions and classes related to colors