diff options
Diffstat (limited to 'niri-ipc/src')
| -rw-r--r-- | niri-ipc/src/lib.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/niri-ipc/src/lib.rs b/niri-ipc/src/lib.rs index a7662b57..05c3a2ec 100644 --- a/niri-ipc/src/lib.rs +++ b/niri-ipc/src/lib.rs @@ -220,6 +220,14 @@ pub enum Action { /// Whether to show the mouse pointer by default in the screenshot UI. #[cfg_attr(feature = "clap", arg(short = 'p', long, action = clap::ArgAction::Set, default_value_t = true))] show_pointer: bool, + + /// Path to save the screenshot to. + /// + /// The path must be absolute, otherwise an error is returned. + /// + /// If `None`, the screenshot is saved according to the `screenshot-path` config setting. + #[cfg_attr(feature = "clap", arg(long, action = clap::ArgAction::Set))] + path: Option<String>, }, /// Screenshot the focused screen. ScreenshotScreen { @@ -232,6 +240,14 @@ pub enum Action { /// Whether to include the mouse pointer in the screenshot. #[cfg_attr(feature = "clap", arg(short = 'p', long, action = clap::ArgAction::Set, default_value_t = true))] show_pointer: bool, + + /// Path to save the screenshot to. + /// + /// The path must be absolute, otherwise an error is returned. + /// + /// If `None`, the screenshot is saved according to the `screenshot-path` config setting. + #[cfg_attr(feature = "clap", arg(long, action = clap::ArgAction::Set))] + path: Option<String>, }, /// Screenshot a window. #[cfg_attr(feature = "clap", clap(about = "Screenshot the focused window"))] @@ -246,6 +262,14 @@ pub enum Action { /// The screenshot is saved according to the `screenshot-path` config setting. #[cfg_attr(feature = "clap", arg(short = 'd', long, action = clap::ArgAction::Set, default_value_t = true))] write_to_disk: bool, + + /// Path to save the screenshot to. + /// + /// The path must be absolute, otherwise an error is returned. + /// + /// If `None`, the screenshot is saved according to the `screenshot-path` config setting. + #[cfg_attr(feature = "clap", arg(long, action = clap::ArgAction::Set))] + path: Option<String>, }, /// Enable or disable the keyboard shortcuts inhibitor (if any) for the focused surface. ToggleKeyboardShortcutsInhibit {}, |
