-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added support for multiline animations * multiline example added * updated description and readme * workflow name updates
- Loading branch information
Showing
12 changed files
with
310 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Update Cargo.toml Version and Publish to Crates | ||
name: Publish to Crates | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Compile Rust Examples and Upload to Release | ||
name: Compile Rust | ||
|
||
on: | ||
push: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
use std::thread::sleep; | ||
use std::time::Duration; | ||
|
||
use unicode_icons::symbols::{check_mark_button,cross_mark}; | ||
|
||
use zenity::multi_spinner::MultiSpinner; | ||
use zenity::spinner::PreDefined; | ||
|
||
fn main() { | ||
let check_mark_text = check_mark_button(); | ||
let cross_mark_text = cross_mark(); | ||
|
||
|
||
let mut spinner = MultiSpinner::new(); | ||
|
||
// main thread operations | ||
let spinner1 = spinner.add(PreDefined::dot_spinner11(false)); | ||
let spinner2 = spinner.add(PreDefined::binary(false)); | ||
let spinner3 = spinner.add(PreDefined::dot_spinner9(false)); | ||
let spinner4 = spinner.add(PreDefined::dot_spinner8(false)); | ||
|
||
// access the spinner through the Arc<Mutex<MultiSpinner>> reference | ||
spinner.run_all(); | ||
|
||
sleep(Duration::from_secs(2)); | ||
|
||
|
||
sleep(Duration::from_secs(8)); | ||
spinner.set_text(&spinner2, "spinner2".to_string()); | ||
// stop spinner1 | ||
spinner.set_text(&spinner1, "spinner1".to_string()); | ||
|
||
sleep(Duration::from_secs(2)); | ||
|
||
spinner.stop(&spinner2); | ||
spinner.set_text(&spinner2, format!("{} Successfully", &check_mark_text)); | ||
|
||
|
||
sleep(Duration::from_secs(2)); | ||
spinner.set_text(&spinner1, "spinner1 stopped".to_string()); | ||
|
||
spinner.stop(&spinner1); | ||
|
||
sleep(Duration::from_secs(9)); | ||
spinner.stop(&spinner3); | ||
spinner.stop(&spinner4); | ||
|
||
spinner.set_text(&spinner3, format!("{} Failed!", &cross_mark_text)); | ||
spinner.set_text(&spinner4, format!("{} Failed!", &cross_mark_text)); | ||
|
||
|
||
sleep(Duration::from_secs(3000000)); | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
pub(crate) mod animation; | ||
pub mod frames; | ||
|
||
pub mod spinner; |
Oops, something went wrong.