mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Stop hardcoding "us" default layout
XKB has its own way to pick the default.
This commit is contained in:
@@ -97,8 +97,8 @@ pub struct Xkb {
|
|||||||
pub rules: String,
|
pub rules: String,
|
||||||
#[knuffel(child, unwrap(argument), default)]
|
#[knuffel(child, unwrap(argument), default)]
|
||||||
pub model: String,
|
pub model: String,
|
||||||
#[knuffel(child, unwrap(argument))]
|
#[knuffel(child, unwrap(argument), default)]
|
||||||
pub layout: Option<String>,
|
pub layout: String,
|
||||||
#[knuffel(child, unwrap(argument), default)]
|
#[knuffel(child, unwrap(argument), default)]
|
||||||
pub variant: String,
|
pub variant: String,
|
||||||
#[knuffel(child, unwrap(argument))]
|
#[knuffel(child, unwrap(argument))]
|
||||||
@@ -110,7 +110,7 @@ impl Xkb {
|
|||||||
XkbConfig {
|
XkbConfig {
|
||||||
rules: &self.rules,
|
rules: &self.rules,
|
||||||
model: &self.model,
|
model: &self.model,
|
||||||
layout: self.layout.as_deref().unwrap_or("us"),
|
layout: &self.layout,
|
||||||
variant: &self.variant,
|
variant: &self.variant,
|
||||||
options: self.options.clone(),
|
options: self.options.clone(),
|
||||||
}
|
}
|
||||||
@@ -1782,7 +1782,7 @@ mod tests {
|
|||||||
input: Input {
|
input: Input {
|
||||||
keyboard: Keyboard {
|
keyboard: Keyboard {
|
||||||
xkb: Xkb {
|
xkb: Xkb {
|
||||||
layout: Some("us,ru".to_owned()),
|
layout: "us,ru".to_owned(),
|
||||||
options: Some("grp:win_space_toggle".to_owned()),
|
options: Some("grp:win_space_toggle".to_owned()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user