diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-28 13:45:24 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-28 13:45:24 +0400 |
| commit | 30911023654b1f1028eb41bade9b1627d3c8344a (patch) | |
| tree | c60e76aff3f8fc4a86ef0a190e4cd0e029c2e954 /niri-ipc | |
| parent | a7b38192142440c59a4e793cf5de99b9a7f1c2c3 (diff) | |
| download | niri-30911023654b1f1028eb41bade9b1627d3c8344a.tar.gz niri-30911023654b1f1028eb41bade9b1627d3c8344a.tar.bz2 niri-30911023654b1f1028eb41bade9b1627d3c8344a.zip | |
Implement niri msg focused-window
Diffstat (limited to 'niri-ipc')
| -rw-r--r-- | niri-ipc/src/lib.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/niri-ipc/src/lib.rs b/niri-ipc/src/lib.rs index e43b9437..fb515e5d 100644 --- a/niri-ipc/src/lib.rs +++ b/niri-ipc/src/lib.rs @@ -14,6 +14,8 @@ pub const SOCKET_PATH_ENV: &str = "NIRI_SOCKET"; pub enum Request { /// Request information about connected outputs. Outputs, + /// Request information about the focused window. + FocusedWindow, /// Perform an action. Action(Action), } @@ -37,6 +39,8 @@ pub enum Response { /// /// Map from connector name to output info. Outputs(HashMap<String, Output>), + /// Information about the focused window. + FocusedWindow(Option<Window>), } /// Actions that niri can perform. @@ -308,6 +312,15 @@ pub enum Transform { Flipped270, } +/// Toplevel window. +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct Window { + /// Title, if set. + pub title: Option<String>, + /// Application ID, if set. + pub app_id: Option<String>, +} + impl FromStr for SizeChange { type Err = &'static str; |
