diff --git a/Cargo.toml b/Cargo.toml index ad0baac..56d42bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ffmpeg-screen-recorder" -version = "1.0.20" +version = "1.0.21" authors = ["Magic Len "] edition = "2021" rust-version = "1.70" diff --git a/src/resolution.rs b/src/resolution.rs index e2dda56..c7b5858 100644 --- a/src/resolution.rs +++ b/src/resolution.rs @@ -35,7 +35,11 @@ impl Resolution { &mut command4, &mut command5, ]) - .with_context(|| anyhow!("xrandr"))?; + .with_context(|| { + anyhow!( + "{command1:?} | {command2:?} | {command3:?} | {command4:?} | {command5:?}" + ) + })?; let res = unsafe { String::from_utf8_unchecked(res_output.stdout) }; diff --git a/src/window_info.rs b/src/window_info.rs index 9cb0b93..78fb980 100644 --- a/src/window_info.rs +++ b/src/window_info.rs @@ -24,7 +24,7 @@ impl WindowInfo { command.stdout(Stdio::piped()); - let output = command.execute_output().with_context(|| anyhow!("xwininfo"))?; + let output = command.execute_output().with_context(|| anyhow!("{command:?}"))?; if output.status.code().is_none() { process::exit(1); @@ -41,7 +41,10 @@ impl WindowInfo { let output = command1 .execute_multiple_input_output(win_info.as_slice(), &mut [&mut command2, &mut command3]) .with_context(|| { - anyhow!("grep 'Width:' from {:?}", String::from_utf8_lossy(win_info.as_slice())) + anyhow!( + "{command1:?} | {command2:?} | {command3:?} | from {:?}", + String::from_utf8_lossy(win_info.as_slice()) + ) })?; let win_width: i32 = unsafe { from_utf8_unchecked(output.stdout.as_slice()) } @@ -54,7 +57,10 @@ impl WindowInfo { let output = command1 .execute_multiple_input_output(win_info.as_slice(), &mut [&mut command2, &mut command3]) .with_context(|| { - anyhow!("grep 'Height:' from {:?}", String::from_utf8_lossy(win_info.as_slice())) + anyhow!( + "{command1:?} | {command2:?} | {command3:?} | from {:?}", + String::from_utf8_lossy(win_info.as_slice()) + ) })?; let win_height: i32 = @@ -66,7 +72,7 @@ impl WindowInfo { .execute_multiple_input_output(win_info.as_slice(), &mut [&mut command2, &mut command3]) .with_context(|| { anyhow!( - "grep 'Absolute upper-left X' from {:?}", + "{command1:?} | {command2:?} | {command3:?} | from {:?}", String::from_utf8_lossy(win_info.as_slice()) ) })?;