Update default Rust config

This commit is contained in:
Ottatop 2024-04-18 16:45:31 -05:00
parent f42f220d5e
commit 6320b4d107

View file

@ -1,3 +1,4 @@
use pinnacle_api::input::libinput::LibinputSetting;
use pinnacle_api::layout::{
CornerLayout, CornerLocation, CyclingLayoutManager, DwindleLayout, FairLayout, MasterSide,
MasterStackLayout, SpiralLayout,
@ -57,6 +58,11 @@ async fn main() {
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
input.keybind([mod_key, Mod::Alt], 'c', || {
if let Some(window) = window.get_focused() {
@ -244,6 +250,8 @@ async fn main() {
});
}
input.set_libinput_setting(LibinputSetting::Tap(true));
// Enable sloppy focus
window.connect_signal(WindowSignal::PointerEnter(Box::new(|win| {
win.set_focused(true);