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",
|
"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]]
|
[[package]]
|
||||||
name = "cosmic-config"
|
name = "cosmic-config"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
@ -778,6 +787,7 @@ dependencies = [
|
||||||
"apply",
|
"apply",
|
||||||
"async-channel",
|
"async-channel",
|
||||||
"color-eyre",
|
"color-eyre",
|
||||||
|
"cosmic-comp-config",
|
||||||
"cosmic-panel-config",
|
"cosmic-panel-config",
|
||||||
"cosmic-settings-desktop",
|
"cosmic-settings-desktop",
|
||||||
"cosmic-settings-page",
|
"cosmic-settings-page",
|
||||||
|
|
@ -2444,6 +2454,29 @@ dependencies = [
|
||||||
"libc",
|
"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]]
|
[[package]]
|
||||||
name = "instant"
|
name = "instant"
|
||||||
version = "0.1.12"
|
version = "0.1.12"
|
||||||
|
|
@ -2661,6 +2694,16 @@ version = "0.2.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
|
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]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.3.8"
|
version = "0.3.8"
|
||||||
|
|
@ -4579,6 +4622,17 @@ version = "1.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
|
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]]
|
[[package]]
|
||||||
name = "uds_windows"
|
name = "uds_windows"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,11 @@ git = "https://github.com/pop-os/libcosmic"
|
||||||
[workspace.dependencies.cosmic-bg-config]
|
[workspace.dependencies.cosmic-bg-config]
|
||||||
git = "https://github.com/pop-os/cosmic-bg"
|
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]
|
[workspace.dependencies.cosmic-panel-config]
|
||||||
git = "https://github.com/pop-os/cosmic-panel"
|
git = "https://github.com/pop-os/cosmic-panel"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ rust-embed = "6.6.1"
|
||||||
slotmap = "1.0.6"
|
slotmap = "1.0.6"
|
||||||
tokio = "1.28.2"
|
tokio = "1.28.2"
|
||||||
downcast-rs = "1.2.0"
|
downcast-rs = "1.2.0"
|
||||||
|
cosmic-comp-config = { workspace = true }
|
||||||
# TODO: migrate this dependency to the pages/desktop crate.
|
# TODO: migrate this dependency to the pages/desktop crate.
|
||||||
cosmic-panel-config = { workspace = true }
|
cosmic-panel-config = { workspace = true }
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ use cosmic::{
|
||||||
iced_sctk::commands,
|
iced_sctk::commands,
|
||||||
iced_widget::core::layout,
|
iced_widget::core::layout,
|
||||||
};
|
};
|
||||||
|
use cosmic_comp_config::XkbConfig;
|
||||||
use cosmic_settings_page as page;
|
use cosmic_settings_page as page;
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
@ -12,15 +13,6 @@ use tracing::error;
|
||||||
pub mod keyboard;
|
pub mod keyboard;
|
||||||
mod mouse;
|
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)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum Message {
|
pub enum Message {
|
||||||
SetAcceleration(bool),
|
SetAcceleration(bool),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue