config: move simple options into schema crate
This commit is contained in:
parent
902853955b
commit
b550bb1025
5 changed files with 53 additions and 42 deletions
3
Cargo.lock
generated
3
Cargo.lock
generated
|
|
@ -807,6 +807,9 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "jay-config-schema"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"jay-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jay-cpu-worker"
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@ description = "Shared configuration schema declarations for the Jay compositor"
|
|||
repository = "https://github.com/mahkoh/jay"
|
||||
|
||||
[dependencies]
|
||||
jay-config = { version = "1.10.0", path = "../jay-config" }
|
||||
|
|
|
|||
|
|
@ -5,5 +5,7 @@
|
|||
//! generated config documentation, and compositor-side application code.
|
||||
|
||||
pub mod animations;
|
||||
pub mod options;
|
||||
|
||||
pub use animations::{AnimationCurveConfig, Animations};
|
||||
pub use options::{Libei, RepeatRate, SimpleIm, Tearing, UiDrag, Vrr, Xwayland};
|
||||
|
|
|
|||
43
jay-config-schema/src/options.rs
Normal file
43
jay-config-schema/src/options.rs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
use jay_config::{
|
||||
video::{TearingMode, VrrMode},
|
||||
xwayland::XScalingMode,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct UiDrag {
|
||||
pub enabled: Option<bool>,
|
||||
pub threshold: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RepeatRate {
|
||||
pub rate: i32,
|
||||
pub delay: i32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Vrr {
|
||||
pub mode: Option<VrrMode>,
|
||||
pub cursor_hz: Option<f64>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SimpleIm {
|
||||
pub enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Xwayland {
|
||||
pub enabled: Option<bool>,
|
||||
pub scaling_mode: Option<XScalingMode>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Tearing {
|
||||
pub mode: Option<TearingMode>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Libei {
|
||||
pub enable_socket: Option<bool>,
|
||||
}
|
||||
|
|
@ -32,10 +32,9 @@ use {
|
|||
logging::LogLevel,
|
||||
status::MessageFormat,
|
||||
theme::{BarPosition, Color},
|
||||
video::{BlendSpace, ColorSpace, Eotf, Format, GfxApi, TearingMode, Transform, VrrMode},
|
||||
video::{BlendSpace, ColorSpace, Eotf, Format, GfxApi, Transform},
|
||||
window::{ContentType, TileState, WindowType},
|
||||
workspace::WorkspaceDisplayOrder,
|
||||
xwayland::XScalingMode,
|
||||
},
|
||||
std::{
|
||||
cell::RefCell,
|
||||
|
|
@ -48,7 +47,9 @@ use {
|
|||
toml::toml_parser,
|
||||
};
|
||||
|
||||
pub use jay_config_schema::{AnimationCurveConfig, Animations};
|
||||
pub use jay_config_schema::{
|
||||
AnimationCurveConfig, Animations, Libei, RepeatRate, SimpleIm, Tearing, UiDrag, Vrr, Xwayland,
|
||||
};
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum SimpleCommand {
|
||||
|
|
@ -260,12 +261,6 @@ pub struct Status {
|
|||
pub separator: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct UiDrag {
|
||||
pub enabled: Option<bool>,
|
||||
pub threshold: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum OutputMatch {
|
||||
Any(Vec<OutputMatch>),
|
||||
|
|
@ -482,39 +477,6 @@ pub enum ConfigKeymap {
|
|||
Defined { name: String, map: Keymap },
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RepeatRate {
|
||||
pub rate: i32,
|
||||
pub delay: i32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Vrr {
|
||||
pub mode: Option<VrrMode>,
|
||||
pub cursor_hz: Option<f64>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SimpleIm {
|
||||
pub enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Xwayland {
|
||||
pub enabled: Option<bool>,
|
||||
pub scaling_mode: Option<XScalingMode>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Tearing {
|
||||
pub mode: Option<TearingMode>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Libei {
|
||||
pub enable_socket: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Shortcut {
|
||||
pub mask: Modifiers,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue