diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-31 14:23:54 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-31 14:23:54 +0400 |
| commit | b0af1129c91a21e29da15f9c5ea6a6dd32c1d85d (patch) | |
| tree | 75f1401c1bb62ac7eec446cc4ce6797d5286b149 /src/config.rs | |
| parent | 02f6b418fef92d076134acbb31e72f38c73dc5ba (diff) | |
| download | niri-b0af1129c91a21e29da15f9c5ea6a6dd32c1d85d.tar.gz niri-b0af1129c91a21e29da15f9c5ea6a6dd32c1d85d.tar.bz2 niri-b0af1129c91a21e29da15f9c5ea6a6dd32c1d85d.zip | |
Include filename in screenshot-path
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/config.rs b/src/config.rs index 2fb603c7..51607efb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -26,8 +26,14 @@ pub struct Config { pub preset_column_widths: Vec<PresetWidth>, #[knuffel(child, unwrap(argument), default = 16)] pub gaps: u16, - #[knuffel(child, unwrap(argument), default = Some(PathBuf::from("~/Pictures/Screenshots")))] - pub screenshot_path: Option<PathBuf>, + #[knuffel( + child, + unwrap(argument), + default = Some(String::from( + "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" + ))) + ] + pub screenshot_path: Option<String>, #[knuffel(child, default)] pub binds: Binds, #[knuffel(child, default)] @@ -541,7 +547,7 @@ mod tests { gaps 8 - screenshot-path "~/Screenshots" + screenshot-path "~/Screenshots/screenshot.png" binds { Mod+T { spawn "alacritty"; } @@ -617,7 +623,7 @@ mod tests { PresetWidth::Fixed(1280), ], gaps: 8, - screenshot_path: Some(PathBuf::from("~/Screenshots")), + screenshot_path: Some(String::from("~/Screenshots/screenshot.png")), binds: Binds(vec