diff options
| author | Ivan Chinenov <hjvt@hjvt.dev> | 2025-02-14 08:15:45 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-14 05:15:45 +0000 |
| commit | 9e794f358b7d44b4e04346dffbd684b2860d6fcc (patch) | |
| tree | c58dffc3306922fdafa6506c25933a37b8762972 /niri-config/src | |
| parent | 4e17cbb9ead83711c927fa511d149af83571ee10 (diff) | |
| download | niri-9e794f358b7d44b4e04346dffbd684b2860d6fcc.tar.gz niri-9e794f358b7d44b4e04346dffbd684b2860d6fcc.tar.bz2 niri-9e794f358b7d44b4e04346dffbd684b2860d6fcc.zip | |
feat: support for setting tablet calibration matrix; this allows for rotating tablet inputs (#1122)
* feat: support for setting tablet calibration matrix
* Change default matrix
Diffstat (limited to 'niri-config/src')
| -rw-r--r-- | niri-config/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index 4520d75c..6a9fb682 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -337,6 +337,8 @@ impl From<TapButtonMap> for input::TapButtonMap { pub struct Tablet { #[knuffel(child)] pub off: bool, + #[knuffel(child, unwrap(arguments))] + pub calibration_matrix: Option<Vec<f32>>, #[knuffel(child, unwrap(argument))] pub map_to_output: Option<String>, #[knuffel(child)] @@ -3560,6 +3562,8 @@ mod tests { tablet { map-to-output "eDP-1" + calibration-matrix 1.0 2.0 3.0 \ + 4.0 5.0 6.0 } touch { @@ -3804,6 +3808,8 @@ mod tests { }, tablet: Tablet { off: false, + calibration_matrix: Some(vec![1., 2., 3., + 4., 5., 6.]), map_to_output: Some("eDP-1".to_owned()), left_handed: false, }, |
