1
0
Fork 0
forked from wry/wry

cli: support png screenshots

This commit is contained in:
Julian Orth 2024-04-21 14:35:35 +02:00
parent 62767ab304
commit 17d5deb2b9
5 changed files with 103 additions and 13 deletions

View file

@ -120,11 +120,23 @@ pub struct IdleSetArgs {
pub interval: Vec<String>,
}
#[derive(ValueEnum, Debug, Copy, Clone, Hash, Default, PartialEq)]
pub enum ScreenshotFormat {
/// The PNG image format.
#[default]
Png,
/// The QOI image format.
Qoi,
}
#[derive(Args, Debug)]
pub struct ScreenshotArgs {
/// The format to use for the image.
#[clap(value_enum, long, default_value_t)]
pub format: ScreenshotFormat,
/// The filename of the saved screenshot
///
/// If no filename is given, the screenshot will be saved under %Y-%m-%d-%H%M%S_jay.qoi
/// If no filename is given, the screenshot will be saved under %Y-%m-%d-%H%M%S_jay.<ext>
/// in the current directory.
///
/// The filename can contain the usual strftime parameters.