mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Add --path argument for niri msg screenshot* commands (#2126)
* Check for empty screenshot parent before creating Avoids a warning. * Add --path argument for niri msg screenshot* commands * fix --------- Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
This commit is contained in:
@@ -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 {},
|
||||
|
||||
Reference in New Issue
Block a user