autocommit 2022-03-24 18:27:42 CET
This commit is contained in:
parent
b3a27f889a
commit
3b1b843821
17 changed files with 388 additions and 212 deletions
|
|
@ -185,6 +185,17 @@ impl Client {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn mono(&self, seat: Seat) -> bool {
|
||||
let res = self.with_response(|| self.send(&ClientMessage::GetMono { seat }));
|
||||
match res {
|
||||
Response::GetMono { mono } => mono,
|
||||
_ => {
|
||||
log::error!("Server did not send a response to a get_mono request");
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn split(&self, seat: Seat) -> Axis {
|
||||
let res = self.with_response(|| self.send(&ClientMessage::GetSplit { seat }));
|
||||
match res {
|
||||
|
|
@ -246,6 +257,10 @@ impl Client {
|
|||
self.send(&ClientMessage::SetBorderWidth { width })
|
||||
}
|
||||
|
||||
pub fn set_mono(&self, seat: Seat, mono: bool) {
|
||||
self.send(&ClientMessage::SetMono { seat, mono });
|
||||
}
|
||||
|
||||
pub fn set_split(&self, seat: Seat, axis: Axis) {
|
||||
self.send(&ClientMessage::SetSplit { seat, axis });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue