add toggle-keyboard-shortcuts-inhibit to CLI/IPC (#1366)
Browse files at this commit2 changed files +5 -0
- niri-config/src/lib.rs +3 -0
- niri-ipc/src/lib.rs +2 -0
niri-config/src/lib.rsmodified+3 -0
| @@ -1739,6 +1739,9 @@ impl From<niri_ipc::Action> for Action { | |||
| 1739 | id: Some(id), | 1739 | id: Some(id), |
| 1740 | write_to_disk, | 1740 | write_to_disk, |
| 1741 | } => Self::ScreenshotWindowById { id, write_to_disk }, | 1741 | } => Self::ScreenshotWindowById { id, write_to_disk }, |
| 1742 | + niri_ipc::Action::ToggleKeyboardShortcutsInhibit {} => { | ||
| 1743 | + Self::ToggleKeyboardShortcutsInhibit | ||
| 1744 | + } | ||
| 1742 | niri_ipc::Action::CloseWindow { id: None } => Self::CloseWindow, | 1745 | niri_ipc::Action::CloseWindow { id: None } => Self::CloseWindow, |
| 1743 | niri_ipc::Action::CloseWindow { id: Some(id) } => Self::CloseWindowById(id), | 1746 | niri_ipc::Action::CloseWindow { id: Some(id) } => Self::CloseWindowById(id), |
| 1744 | niri_ipc::Action::FullscreenWindow { id: None } => Self::FullscreenWindow, | 1747 | niri_ipc::Action::FullscreenWindow { id: None } => Self::FullscreenWindow, |
niri-ipc/src/lib.rsmodified+2 -0
| @@ -212,6 +212,8 @@ pub enum Action { | |||
| 212 | #[cfg_attr(feature = "clap", arg(short = 'd', long, action = clap::ArgAction::Set, default_value_t = true))] | 212 | #[cfg_attr(feature = "clap", arg(short = 'd', long, action = clap::ArgAction::Set, default_value_t = true))] |
| 213 | write_to_disk: bool, | 213 | write_to_disk: bool, |
| 214 | }, | 214 | }, |
| 215 | + /// Enable or disable the keyboard shortcuts inhibitor (if any) for the focused window. | ||
| 216 | + ToggleKeyboardShortcutsInhibit {}, | ||
| 215 | /// Close a window. | 217 | /// Close a window. |
| 216 | #[cfg_attr(feature = "clap", clap(about = "Close the focused window"))] | 218 | #[cfg_attr(feature = "clap", clap(about = "Close the focused window"))] |
| 217 | CloseWindow { | 219 | CloseWindow { |