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)! Follow these steps:
§Spinner
// example/multi_spinner.rs
use zenity::spinner::{MultiSpinner, Frames};
let spinner = MultiSpinner::default();
// do work...
spinner.stop(&spinner.get_last());
spinner.set_text(&spinner.get_last(), "Successfully".to_string());
§Progress Bar
// examples/progress.rs
use zenity::progress::ProgressBar;
let progress = ProgressBar::default();
let loading = 1_usize;
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.
If you find this project helpful or enjoyable, consider giving it a star on GitHub.
Modules§
- color
- Mod for color related methods Example:
- menu
- implementation for menus (work in progress checkout: issue#20)
- progress
- mod for progress bars
- spinner
- Module for multiline spinners
- style
- Collection of helper functions and classes related to colors
Macros§
- styled_
string - convert vec string into vec StyledString