diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-03 17:02:07 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-03 17:02:07 +0400 |
| commit | 1bcc889e6232515a12f38738418586f03ea8c8c6 (patch) | |
| tree | 7d48643d6a1656b01b78dd26883f3b39dbe95bdf /src | |
| parent | 7bb1c114a2f29f339f547e226cfd7d3af47f414f (diff) | |
| download | niri-1bcc889e6232515a12f38738418586f03ea8c8c6.tar.gz niri-1bcc889e6232515a12f38738418586f03ea8c8c6.tar.bz2 niri-1bcc889e6232515a12f38738418586f03ea8c8c6.zip | |
Add tablet map-to-output setting
Diffstat (limited to 'src')
| -rw-r--r-- | src/config.rs | 15 | ||||
| -rw-r--r-- | src/input.rs | 6 | ||||
| -rw-r--r-- | src/niri.rs | 16 |
3 files changed, 32 insertions, 5 deletions
diff --git a/src/config.rs b/src/config.rs index 9f73518b..730a0f4b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -35,6 +35,8 @@ pub struct Input { pub keyboard: Keyboard, #[knuffel(child, default)] pub touchpad: Touchpad, + #[knuffel(child, default)] + pub tablet: Tablet, } #[derive(knuffel::Decode, Debug, Default, PartialEq, Eq)] @@ -73,6 +75,12 @@ pub struct Touchpad { pub accel_speed: f64, } +#[derive(knuffel::Decode, Debug, Default, PartialEq)] +pub struct Tablet { + #[knuffel(child, unwrap(argument))] + pub map_to_output: Option<String>, +} + #[derive(knuffel::Decode, Debug, Clone, PartialEq)] pub struct Output { #[knuffel(argument)] @@ -478,6 +486,10 @@ mod tests { tap accel-speed 0.2 } + + tablet { + map-to-output "eDP-1" + } } output "eDP-1" { @@ -530,6 +542,9 @@ mod tests { natural_scroll: false, accel_speed: 0.2, }, + tablet: Tablet { + map_to_output: Some("eDP-1".to_owned()), + }, }, outputs: vec