refactor(config): fix no features enabled
This commit is contained in:
parent
9ea3ba01e2
commit
458f5f4dcf
4 changed files with 26 additions and 26 deletions
|
|
@ -11,6 +11,30 @@ pub mod input;
|
||||||
pub mod output;
|
pub mod output;
|
||||||
pub mod workspace;
|
pub mod workspace;
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Serialize, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
pub struct EdidProduct {
|
||||||
|
pub manufacturer: [char; 3],
|
||||||
|
pub product: u16,
|
||||||
|
pub serial: Option<u32>,
|
||||||
|
pub manufacture_week: i32,
|
||||||
|
pub manufacture_year: i32,
|
||||||
|
pub model_year: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "libdisplay-info")]
|
||||||
|
impl From<libdisplay_info::edid::VendorProduct> for EdidProduct {
|
||||||
|
fn from(vp: libdisplay_info::edid::VendorProduct) -> Self {
|
||||||
|
Self {
|
||||||
|
manufacturer: vp.manufacturer,
|
||||||
|
product: vp.product,
|
||||||
|
serial: vp.serial,
|
||||||
|
manufacture_week: vp.manufacture_week,
|
||||||
|
manufacture_year: vp.manufacture_year,
|
||||||
|
model_year: vp.model_year,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct KeyboardConfig {
|
pub struct KeyboardConfig {
|
||||||
/// Boot state for numlock
|
/// Boot state for numlock
|
||||||
|
|
|
||||||
|
|
@ -4,30 +4,6 @@ use serde::{Deserialize, Serialize};
|
||||||
use std::{collections::HashMap, fs::OpenOptions, path::Path};
|
use std::{collections::HashMap, fs::OpenOptions, path::Path};
|
||||||
use tracing::{error, warn};
|
use tracing::{error, warn};
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
||||||
pub struct EdidProduct {
|
|
||||||
pub manufacturer: [char; 3],
|
|
||||||
pub product: u16,
|
|
||||||
pub serial: Option<u32>,
|
|
||||||
pub manufacture_week: i32,
|
|
||||||
pub manufacture_year: i32,
|
|
||||||
pub model_year: Option<i32>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "libdisplay-info")]
|
|
||||||
impl From<libdisplay_info::edid::VendorProduct> for EdidProduct {
|
|
||||||
fn from(vp: libdisplay_info::edid::VendorProduct) -> Self {
|
|
||||||
Self {
|
|
||||||
manufacturer: vp.manufacturer,
|
|
||||||
product: vp.product,
|
|
||||||
serial: vp.serial,
|
|
||||||
manufacture_week: vp.manufacture_week,
|
|
||||||
manufacture_year: vp.manufacture_year,
|
|
||||||
model_year: vp.model_year,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
|
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
|
||||||
#[serde(rename_all = "lowercase")]
|
#[serde(rename_all = "lowercase")]
|
||||||
pub enum OutputState {
|
pub enum OutputState {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::output::comp::EdidProduct;
|
use crate::EdidProduct;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct WorkspaceConfig {
|
pub struct WorkspaceConfig {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ pub mod key_bindings;
|
||||||
mod types;
|
mod types;
|
||||||
|
|
||||||
use cosmic::config::CosmicTk;
|
use cosmic::config::CosmicTk;
|
||||||
pub use cosmic_comp_config::output::comp::EdidProduct;
|
pub use cosmic_comp_config::EdidProduct;
|
||||||
use cosmic_comp_config::{
|
use cosmic_comp_config::{
|
||||||
input::{DeviceState as InputDeviceState, InputConfig, TouchpadOverride},
|
input::{DeviceState as InputDeviceState, InputConfig, TouchpadOverride},
|
||||||
output::comp::{
|
output::comp::{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue