cosmic-comp-config crate, and default input config

This adds a `input-default` setting, which is used for input settings if a
device isn't set in `input-devices`. More awkwardly, it also adds an
`input-touchpad` setting, which is used instead of `input-default` for
touchpad devices, so we can separate mouse and touchpad settings even
though they use the same capability and settings.

This no longer sets the input config, and only reads it. If we add a UI
for per-device config, we'll need some IPC mechanism to list connected
devices. (Assuming cosmic-settings can't use libinput directly for that.)

This moves `InputConfig` and `XkbConfig` to a new `cosmic-comp-config`
crate, so they can be used in `cosmic-settings`.
This commit is contained in:
Ian Douglas Scott 2023-08-29 13:49:41 -07:00
parent 0f5d654535
commit 56467755a8
9 changed files with 536 additions and 468 deletions

10
Cargo.lock generated
View file

@ -481,6 +481,7 @@ dependencies = [
"bitflags 1.3.2",
"bytemuck",
"calloop",
"cosmic-comp-config",
"cosmic-config",
"cosmic-protocols",
"edid-rs",
@ -522,6 +523,14 @@ dependencies = [
"xkbcommon 0.4.1",
]
[[package]]
name = "cosmic-comp-config"
version = "0.1.0"
dependencies = [
"input",
"serde",
]
[[package]]
name = "cosmic-config"
version = "0.1.0"
@ -1981,6 +1990,7 @@ dependencies = [
"input-sys",
"io-lifetimes",
"libc",
"log",
"udev",
]