Skip to content

Commit

Permalink
cosmic_comp_config: Some trait implementations and re-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ids1024 committed Aug 31, 2023
1 parent 5646775 commit 4a5024d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cosmic-comp-config/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#![allow(non_snake_case)]

use input::{AccelProfile, ClickMethod, ScrollMethod, TapButtonMap};
pub use input::{AccelProfile, ClickMethod, ScrollMethod, TapButtonMap};
use serde::{Deserialize, Serialize};

#[derive(Debug, Default, Deserialize, Serialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct InputConfig {
pub state: DeviceState,
#[serde(skip_serializing_if = "Option::is_none", default)]
Expand All @@ -29,14 +29,14 @@ pub struct InputConfig {
pub tap_config: Option<TapConfig>,
}

#[derive(Debug, Deserialize, Serialize)]
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct AccelConfig {
#[serde(with = "AccelProfileDef")]
pub profile: Option<AccelProfile>,
pub speed: f64,
}

#[derive(Debug, Deserialize, Serialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ScrollConfig {
#[serde(with = "ScrollMethodDef")]
pub method: Option<ScrollMethod>,
Expand All @@ -57,7 +57,7 @@ impl Default for DeviceState {
}
}

#[derive(Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TapConfig {
pub enabled: bool,
#[serde(with = "TapButtonMapDef")]
Expand Down

0 comments on commit 4a5024d

Please sign in to comment.