aboutsummaryrefslogtreecommitdiff
path: root/niri-config/src/lib.rs
diff options
context:
space:
mode:
authorChristian Meissl <meissl.christian@gmail.com>2024-02-24 18:32:13 +0100
committerIvan Molodetskikh <yalterz@gmail.com>2024-02-28 13:19:41 +0400
commit719697179f6ddd79206e6ccf058a5e43f18ba346 (patch)
treee316e65487350f12ef76f9741dc9abdaddfb0139 /niri-config/src/lib.rs
parent5ac350d51c0f16be3e40355bcb25cf23d34cc662 (diff)
downloadniri-719697179f6ddd79206e6ccf058a5e43f18ba346.tar.gz
niri-719697179f6ddd79206e6ccf058a5e43f18ba346.tar.bz2
niri-719697179f6ddd79206e6ccf058a5e43f18ba346.zip
input: add basic touch support
Diffstat (limited to 'niri-config/src/lib.rs')
-rw-r--r--niri-config/src/lib.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs
index f5f8efd6..59a4813c 100644
--- a/niri-config/src/lib.rs
+++ b/niri-config/src/lib.rs
@@ -62,6 +62,8 @@ pub struct Input {
pub trackpoint: Trackpoint,
#[knuffel(child, default)]
pub tablet: Tablet,
+ #[knuffel(child, default)]
+ pub touch: Touch,
#[knuffel(child)]
pub disable_power_key_handling: bool,
}
@@ -201,6 +203,12 @@ pub struct Tablet {
pub map_to_output: Option<String>,
}
+#[derive(knuffel::Decode, Debug, Default, PartialEq)]
+pub struct Touch {
+ #[knuffel(child, unwrap(argument))]
+ pub map_to_output: Option<String>,
+}
+
#[derive(knuffel::Decode, Debug, Clone, PartialEq)]
pub struct Output {
#[knuffel(child)]
@@ -1092,6 +1100,10 @@ mod tests {
map-to-output "eDP-1"
}
+ touch {
+ map-to-output "eDP-1"
+ }
+
disable-power-key-handling
}
@@ -1223,6 +1235,9 @@ mod tests {
tablet: Tablet {
map_to_output: Some("eDP-1".to_owned()),
},
+ touch: Touch {
+ map_to_output: Some("eDP-1".to_owned()),
+ },
disable_power_key_handling: true,
},
outputs: vec![Output {