mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-25 09:59:21 +01:00
Update default Rust config
This commit is contained in:
parent
f42f220d5e
commit
6320b4d107
1 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
use pinnacle_api::input::libinput::LibinputSetting;
|
||||||
use pinnacle_api::layout::{
|
use pinnacle_api::layout::{
|
||||||
CornerLayout, CornerLocation, CyclingLayoutManager, DwindleLayout, FairLayout, MasterSide,
|
CornerLayout, CornerLocation, CyclingLayoutManager, DwindleLayout, FairLayout, MasterSide,
|
||||||
MasterStackLayout, SpiralLayout,
|
MasterStackLayout, SpiralLayout,
|
||||||
|
@ -57,6 +58,11 @@ async fn main() {
|
||||||
pinnacle.quit();
|
pinnacle.quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// `mod_key + alt + r` reloads the config
|
||||||
|
input.keybind([mod_key, Mod::Alt], 'r', || {
|
||||||
|
pinnacle.reload_config();
|
||||||
|
});
|
||||||
|
|
||||||
// `mod_key + alt + c` closes the focused window
|
// `mod_key + alt + c` closes the focused window
|
||||||
input.keybind([mod_key, Mod::Alt], 'c', || {
|
input.keybind([mod_key, Mod::Alt], 'c', || {
|
||||||
if let Some(window) = window.get_focused() {
|
if let Some(window) = window.get_focused() {
|
||||||
|
@ -244,6 +250,8 @@ async fn main() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.set_libinput_setting(LibinputSetting::Tap(true));
|
||||||
|
|
||||||
// Enable sloppy focus
|
// Enable sloppy focus
|
||||||
window.connect_signal(WindowSignal::PointerEnter(Box::new(|win| {
|
window.connect_signal(WindowSignal::PointerEnter(Box::new(|win| {
|
||||||
win.set_focused(true);
|
win.set_focused(true);
|
||||||
|
|
Loading…
Reference in a new issue