Print message when output was not found

This commit is contained in:
Ivan Molodetskikh
2024-05-05 12:50:18 +04:00
parent 2e4a2e13b1
commit ea59091869
3 changed files with 33 additions and 6 deletions
+11
View File
@@ -58,6 +58,8 @@ pub enum Response {
Outputs(HashMap<String, Output>),
/// Information about the focused window.
FocusedWindow(Option<Window>),
/// Output configuration change result.
OutputConfigChanged(OutputConfigChanged),
}
/// Actions that niri can perform.
@@ -456,6 +458,15 @@ pub struct Window {
pub app_id: Option<String>,
}
/// Output configuration change result.
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
pub enum OutputConfigChanged {
/// The target output was connected and the change was applied.
Applied,
/// The target output was not found, the change will be applied when it is connected.
OutputWasMissing,
}
impl FromStr for SizeChange {
type Err = &'static str;