input: Use cosmic-comp-config crate
This commit is contained in:
parent
a5fcd5326e
commit
154c67ee6a
4 changed files with 61 additions and 9 deletions
54
Cargo.lock
generated
54
Cargo.lock
generated
|
|
@ -732,6 +732,15 @@ dependencies = [
|
|||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-comp-config"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/cosmic-comp?branch=cosmic-comp-config#7955b16bd56122d021b762153e86dd90158d18e2"
|
||||
dependencies = [
|
||||
"input",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-config"
|
||||
version = "0.1.0"
|
||||
|
|
@ -778,6 +787,7 @@ dependencies = [
|
|||
"apply",
|
||||
"async-channel",
|
||||
"color-eyre",
|
||||
"cosmic-comp-config",
|
||||
"cosmic-panel-config",
|
||||
"cosmic-settings-desktop",
|
||||
"cosmic-settings-page",
|
||||
|
|
@ -2444,6 +2454,29 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "input"
|
||||
version = "0.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6e74cd82cedcd66db78742a8337bdc48f188c4d2c12742cbc5cd85113f0b059"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"input-sys",
|
||||
"io-lifetimes",
|
||||
"libc",
|
||||
"log",
|
||||
"udev",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "input-sys"
|
||||
version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05f6c2a17e8aba7217660e32863af87b0febad811d4b8620ef76b386603fddc2"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
|
|
@ -2661,6 +2694,16 @@ version = "0.2.7"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
|
||||
|
||||
[[package]]
|
||||
name = "libudev-sys"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.3.8"
|
||||
|
|
@ -4579,6 +4622,17 @@ version = "1.16.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
|
||||
|
||||
[[package]]
|
||||
name = "udev"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ebdbbd670373442a12fe9ef7aeb53aec4147a5a27a00bbc3ab639f08f48191a"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"libudev-sys",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uds_windows"
|
||||
version = "1.0.2"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ git = "https://github.com/pop-os/libcosmic"
|
|||
[workspace.dependencies.cosmic-bg-config]
|
||||
git = "https://github.com/pop-os/cosmic-bg"
|
||||
|
||||
[workspace.dependencies.cosmic-comp-config]
|
||||
git = "https://github.com/pop-os/cosmic-comp"
|
||||
branch = "cosmic-comp-config"
|
||||
# path = "../cosmic-comp/cosmic-comp-config"
|
||||
|
||||
[workspace.dependencies.cosmic-panel-config]
|
||||
git = "https://github.com/pop-os/cosmic-panel"
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ rust-embed = "6.6.1"
|
|||
slotmap = "1.0.6"
|
||||
tokio = "1.28.2"
|
||||
downcast-rs = "1.2.0"
|
||||
cosmic-comp-config = { workspace = true }
|
||||
# TODO: migrate this dependency to the pages/desktop crate.
|
||||
cosmic-panel-config = { workspace = true }
|
||||
tracing = "0.1.37"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use cosmic::{
|
|||
iced_sctk::commands,
|
||||
iced_widget::core::layout,
|
||||
};
|
||||
use cosmic_comp_config::XkbConfig;
|
||||
use cosmic_settings_page as page;
|
||||
use itertools::Itertools;
|
||||
use tracing::error;
|
||||
|
|
@ -12,15 +13,6 @@ use tracing::error;
|
|||
pub mod keyboard;
|
||||
mod mouse;
|
||||
|
||||
#[derive(Debug, Default, Clone, serde::Deserialize, serde::Serialize)]
|
||||
pub struct XkbConfig {
|
||||
pub rules: String,
|
||||
pub model: String,
|
||||
pub layout: String,
|
||||
pub variant: String,
|
||||
pub options: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum Message {
|
||||
SetAcceleration(bool),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue