1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-03 11:41:04 +02:00

feat: ability to set bar layer and exclusive zone

This commit is contained in:
Jake Stanger 2024-06-13 21:42:40 +01:00
parent c28de8d902
commit aa45396062
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
7 changed files with 145 additions and 36 deletions

View file

@ -118,4 +118,15 @@ pub enum BarCommandType {
},
/// Get the popup's current visibility state.
GetPopupVisible,
// == Exclusivity == \\
/// Set whether the bar reserves an exclusive zone.
SetExclusive {
#[clap(
num_args(1),
require_equals(true),
action = ArgAction::Set,
)]
exclusive: bool,
},
}

View file

@ -43,6 +43,11 @@ pub fn handle_command(command: BarCommand, ironbar: &Rc<Ironbar>) -> Response {
GetPopupVisible => Response::OkValue {
value: bar.popup().visible().to_string(),
},
SetExclusive { exclusive } => {
bar.set_exclusive(exclusive);
Response::Ok
}
}
}