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:
parent
c28de8d902
commit
aa45396062
7 changed files with 145 additions and 36 deletions
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue