Add hardcoded us,ru layout and Super+Space switch

This commit is contained in:
Ivan Molodetskikh
2023-08-10 18:14:11 +04:00
parent db3c030fdd
commit 91c7763aab
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -41,6 +41,8 @@ impl Niri {
time,
|_, mods, keysym| {
if event.state() == KeyState::Pressed {
// FIXME: these don't work in the Russian layout. I guess I'll need to
// find a US keymap, then map keys somehow.
match keysym.modified_sym() {
keysyms::KEY_E if mods.logo => {
FilterResult::Intercept(InputAction::Quit)
+6 -1
View File
@@ -81,7 +81,12 @@ impl Niri {
let mut seat: Seat<Self> = seat_state.new_wl_seat(&display_handle, seat_name);
// FIXME: get Xkb and repeat interval from GNOME dconf.
seat.add_keyboard(XkbConfig::default(), 400, 30).unwrap();
let xkb = XkbConfig {
layout: "us,ru",
options: Some("grp:win_space_toggle".to_owned()),
..Default::default()
};
seat.add_keyboard(xkb, 400, 30).unwrap();
seat.add_pointer();
let space = Space::default();