diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2025-01-14 09:10:45 +0100 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-14 13:39:52 +0300 |
| commit | 0df7a085de6fb0ebfe7af640e60fb496e52656aa (patch) | |
| tree | 78255e74c2989f5a3ba449a80c3cc7a3498bf8d7 /niri-ipc/src | |
| parent | 6ae51f287cb286a96fcf492444f33b0d6ad4a56a (diff) | |
| download | niri-0df7a085de6fb0ebfe7af640e60fb496e52656aa.tar.gz niri-0df7a085de6fb0ebfe7af640e60fb496e52656aa.tar.bz2 niri-0df7a085de6fb0ebfe7af640e60fb496e52656aa.zip | |
add write-to-disk argument to screenshot actions
Diffstat (limited to 'niri-ipc/src')
| -rw-r--r-- | niri-ipc/src/lib.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/niri-ipc/src/lib.rs b/niri-ipc/src/lib.rs index e11624f5..f8d39365 100644 --- a/niri-ipc/src/lib.rs +++ b/niri-ipc/src/lib.rs @@ -167,7 +167,13 @@ pub enum Action { /// Open the screenshot UI. Screenshot {}, /// Screenshot the focused screen. - ScreenshotScreen {}, + ScreenshotScreen { + /// Write the screenshot to disk in addition to putting it in your clipboard. + /// + /// 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, + }, /// Screenshot a window. #[cfg_attr(feature = "clap", clap(about = "Screenshot the focused window"))] ScreenshotWindow { @@ -176,6 +182,11 @@ pub enum Action { /// If `None`, uses the focused window. #[cfg_attr(feature = "clap", arg(long))] id: Option<u64>, + /// Write the screenshot to disk in addition to putting it in your clipboard. + /// + /// 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, }, /// Close a window. #[cfg_attr(feature = "clap", clap(about = "Close the focused window"))] |
