much faster screencapturing with scrot instead

This commit is contained in:
Dustin Carlino 2019-01-14 10:14:14 -08:00
parent 164cd7d757
commit 2f35ca5dc1

View File

@ -112,13 +112,13 @@ pub fn run<T, G: GUI<T>>(mut gui: G, window_title: &str) {
"Grabbing {} (of {}, {} total)", "Grabbing {} (of {}, {} total)",
filename, cap.num_tiles_x, cap.num_tiles_y filename, cap.num_tiles_x, cap.num_tiles_y
); );
if !process::Command::new("gnome-screenshot") if !process::Command::new("scrot")
.args(&["--window", "--remove-border", "-f", &filename]) .args(&["--quality", "100", "--focused", "--silent", &filename])
.status() .status()
.unwrap() .unwrap()
.success() .success()
{ {
println!("gnome-screenshot failed; aborting"); println!("scrot failed; aborting");
screen_cap = None; screen_cap = None;
continue; continue;
} }