pinnacle/api/rust/examples/example_config.rs
2023-10-19 17:43:37 -05:00

19 lines
487 B
Rust

use pinnacle_api::{Modifier, MouseButton, MouseEdge};
fn main() {
pinnacle_api::setup(|pinnacle| {
pinnacle.process.spawn(vec!["alacritty"]).unwrap();
pinnacle.input.keybind(&[Modifier::Ctrl], 'a', move || {
pinnacle.process.spawn(vec!["alacritty"]).unwrap();
});
pinnacle.input.mousebind(
&[Modifier::Ctrl],
MouseButton::Left,
MouseEdge::Press,
|| {},
);
})
.unwrap();
}