diff --git a/Cargo.lock b/Cargo.lock index 64bcda38..fa109432 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -807,6 +807,9 @@ dependencies = [ [[package]] name = "jay-config-schema" version = "0.1.0" +dependencies = [ + "jay-config", +] [[package]] name = "jay-cpu-worker" diff --git a/jay-config-schema/Cargo.toml b/jay-config-schema/Cargo.toml index 18285ff6..521a92cc 100644 --- a/jay-config-schema/Cargo.toml +++ b/jay-config-schema/Cargo.toml @@ -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" } diff --git a/jay-config-schema/src/lib.rs b/jay-config-schema/src/lib.rs index 959becfc..868aaa1d 100644 --- a/jay-config-schema/src/lib.rs +++ b/jay-config-schema/src/lib.rs @@ -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}; diff --git a/jay-config-schema/src/options.rs b/jay-config-schema/src/options.rs new file mode 100644 index 00000000..e9d3d271 --- /dev/null +++ b/jay-config-schema/src/options.rs @@ -0,0 +1,43 @@ +use jay_config::{ + video::{TearingMode, VrrMode}, + xwayland::XScalingMode, +}; + +#[derive(Debug, Clone, Default)] +pub struct UiDrag { + pub enabled: Option, + pub threshold: Option, +} + +#[derive(Debug, Clone)] +pub struct RepeatRate { + pub rate: i32, + pub delay: i32, +} + +#[derive(Debug, Clone)] +pub struct Vrr { + pub mode: Option, + pub cursor_hz: Option, +} + +#[derive(Debug, Clone)] +pub struct SimpleIm { + pub enabled: Option, +} + +#[derive(Debug, Clone)] +pub struct Xwayland { + pub enabled: Option, + pub scaling_mode: Option, +} + +#[derive(Debug, Clone)] +pub struct Tearing { + pub mode: Option, +} + +#[derive(Debug, Clone, Default)] +pub struct Libei { + pub enable_socket: Option, +} diff --git a/toml-config/src/config.rs b/toml-config/src/config.rs index 6fbb334f..0714f24c 100644 --- a/toml-config/src/config.rs +++ b/toml-config/src/config.rs @@ -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, } -#[derive(Debug, Clone, Default)] -pub struct UiDrag { - pub enabled: Option, - pub threshold: Option, -} - #[derive(Debug, Clone)] pub enum OutputMatch { Any(Vec), @@ -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, - pub cursor_hz: Option, -} - -#[derive(Debug, Clone)] -pub struct SimpleIm { - pub enabled: Option, -} - -#[derive(Debug, Clone)] -pub struct Xwayland { - pub enabled: Option, - pub scaling_mode: Option, -} - -#[derive(Debug, Clone)] -pub struct Tearing { - pub mode: Option, -} - -#[derive(Debug, Clone, Default)] -pub struct Libei { - pub enable_socket: Option, -} - #[derive(Debug, Clone)] pub struct Shortcut { pub mask: Modifiers,