### Run demo example Source: https://github.com/arkbig/throbber-widgets-tui/blob/main/README.md Runs the demo example with all available throbber symbols. Requires the project to be built with the demo example included. ```sh cargo run --example demo --release ``` -------------------------------- ### List direct dependency licenses with cargo license Source: https://github.com/arkbig/throbber-widgets-tui/blob/main/README.md Generates a Markdown table of direct dependencies and their licenses. Requires the cargo-license tool. The output is a table with columns License and crate. ```sh cargo license --direct-deps-only --avoid-build-deps --avoid-dev-deps | awk -F ":" 'BEGIN {printf "|License|crate|\n|-|-|\n"} {printf "|%s|%s|\n", $1, $2}' ``` -------------------------------- ### List chain dependency licenses with cargo license Source: https://github.com/arkbig/throbber-widgets-tui/blob/main/README.md Generates a Markdown table of all chain dependencies and their licenses. Requires the cargo-license tool. The output is a table with columns License and crate. ```sh cargo license --avoid-build-deps --avoid-dev-deps | awk -F ":" 'BEGIN {printf "|License|crate|\n|-|-|\n"} {printf "|%s|%s|\n", $1, $2}' ``` -------------------------------- ### Use Throbber widget in ratatui Source: https://github.com/arkbig/throbber-widgets-tui/blob/main/README.md Shows how to use the Throbber widget in a ratatui application. The App struct holds a ThrobberState and advances it on each tick. The ui function renders a simple random-step throbber and a full stateful throbber with a label, styles, the CLOCK symbol set, and Spin use type. ```rust // : // : struct App { throbber_state: throbber_widgets_tui::ThrobberState, } impl App { fn on_tick(&mut self) { self.throbber_state.calc_next(); } } // : // : fn ui(f: &mut ratatui::Frame, app: &mut App) { let chunks = ratatui::layout::Layout::default() .direction(ratatui::layout::Direction::Horizontal) .margin(1) .constraints( [ ratatui::layout::Constraint::Percentage(50), ratatui::layout::Constraint::Percentage(50), ] .as_ref(), ) .split(f.area()); // Simple random step let simple = throbber_widgets_tui::Throbber::default(); f.render_widget(simple, chunks[0]); // Set full with state let full = throbber_widgets_tui::Throbber::default() .label("Running...") .style(ratatui::style::Style::default().fg(ratatui::style::Color::Cyan)) .throbber_style(ratatui::style::Style::default().fg(ratatui::style::Color::Red).add_modifier(ratatui::style::Modifier::BOLD)) .throbber_set(throbber_widgets_tui::CLOCK) .use_type(throbber_widgets_tui::WhichUse::Spin); f.render_stateful_widget(full, chunks[1], &mut app.throbber_state); } ``` -------------------------------- ### Add throbber-widgets-tui dependency Source: https://github.com/arkbig/throbber-widgets-tui/blob/main/README.md Adds the throbber-widgets-tui crate as a dependency. Requires rustc 1.88.0 or newer. ```sh cargo add throbber-widgets-tui ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.