diff options
Diffstat (limited to 'niri-config/src')
| -rw-r--r-- | niri-config/src/binds.rs | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/niri-config/src/binds.rs b/niri-config/src/binds.rs index 37ac1665..71181fc0 100644 --- a/niri-config/src/binds.rs +++ b/niri-config/src/binds.rs @@ -118,16 +118,27 @@ pub enum Action { CancelScreenshot, #[knuffel(skip)] ScreenshotTogglePointer, - Screenshot(#[knuffel(property(name = "show-pointer"), default = true)] bool), + Screenshot( + #[knuffel(property(name = "show-pointer"), default = true)] bool, + // Path; not settable from knuffel + Option<String>, + ), ScreenshotScreen( #[knuffel(property(name = "write-to-disk"), default = true)] bool, #[knuffel(property(name = "show-pointer"), default = true)] bool, + // Path; not settable from knuffel + Option<String>, + ), + ScreenshotWindow( + #[knuffel(property(name = "write-to-disk"), default = true)] bool, + // Path; not settable from knuffel + Option<String>, ), - ScreenshotWindow(#[knuffel(property(name = "write-to-disk"), default = true)] bool), #[knuffel(skip)] ScreenshotWindowById { id: u64, write_to_disk: bool, + path: Option<String>, }, ToggleKeyboardShortcutsInhibit, CloseWindow, @@ -364,19 +375,28 @@ impl From<niri_ipc::Action> for Action { niri_ipc::Action::Spawn { command } => Self::Spawn(command), niri_ipc::Action::SpawnSh { command } => Self::SpawnSh(command), niri_ipc::Action::DoScreenTransition { delay_ms } => Self::DoScreenTransition(delay_ms), - niri_ipc::Action::Screenshot { show_pointer } => Self::Screenshot(show_pointer), + niri_ipc::Action::Screenshot { show_pointer, path } => { + Self::Screenshot(show_pointer, path) + } niri_ipc::Action::ScreenshotScreen { write_to_disk, show_pointer, - } => Self::ScreenshotScreen(write_to_disk, show_pointer), + path, + } => Self::ScreenshotScreen(write_to_disk, show_pointer, path), niri_ipc::Action::ScreenshotWindow { id: None, write_to_disk, - } => Self::ScreenshotWindow(write_to_disk), + path, + } => Self::ScreenshotWindow(write_to_disk, path), niri_ipc::Action::ScreenshotWindow { id: Some(id), write_to_disk, - } => Self::ScreenshotWindowById { id, write_to_disk }, + path, + } => Self::ScreenshotWindowById { + id, + write_to_disk, + path, + }, niri_ipc::Action::ToggleKeyboardShortcutsInhibit {} => { Self::ToggleKeyboardShortcutsInhibit } |
