config: move theme schema into schema crate
This commit is contained in:
parent
41e7fcc290
commit
e94d8fec1f
3 changed files with 51 additions and 49 deletions
|
|
@ -6,9 +6,11 @@
|
||||||
|
|
||||||
pub mod animations;
|
pub mod animations;
|
||||||
pub mod options;
|
pub mod options;
|
||||||
|
pub mod theme;
|
||||||
|
|
||||||
pub use animations::{AnimationCurveConfig, Animations};
|
pub use animations::{AnimationCurveConfig, Animations};
|
||||||
pub use options::{
|
pub use options::{
|
||||||
ColorManagement, Float, FocusHistory, Libei, RepeatRate, SimpleIm, Tearing, UiDrag, Vrr,
|
ColorManagement, Float, FocusHistory, Libei, RepeatRate, SimpleIm, Tearing, UiDrag, Vrr,
|
||||||
Xwayland,
|
Xwayland,
|
||||||
};
|
};
|
||||||
|
pub use theme::Theme;
|
||||||
|
|
|
||||||
48
jay-config-schema/src/theme.rs
Normal file
48
jay-config-schema/src/theme.rs
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
use jay_config::theme::{BarPosition, Color};
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Default)]
|
||||||
|
pub struct Theme {
|
||||||
|
pub attention_requested_bg_color: Option<Color>,
|
||||||
|
pub bg_color: Option<Color>,
|
||||||
|
pub bar_bg_color: Option<Color>,
|
||||||
|
pub bar_status_text_color: Option<Color>,
|
||||||
|
pub border_color: Option<Color>,
|
||||||
|
pub active_border_color: Option<Color>,
|
||||||
|
pub captured_focused_title_bg_color: Option<Color>,
|
||||||
|
pub captured_unfocused_title_bg_color: Option<Color>,
|
||||||
|
pub focused_inactive_title_bg_color: Option<Color>,
|
||||||
|
pub focused_inactive_title_text_color: Option<Color>,
|
||||||
|
pub focused_title_bg_color: Option<Color>,
|
||||||
|
pub focused_title_text_color: Option<Color>,
|
||||||
|
pub separator_color: Option<Color>,
|
||||||
|
pub unfocused_title_bg_color: Option<Color>,
|
||||||
|
pub unfocused_title_text_color: Option<Color>,
|
||||||
|
pub highlight_color: Option<Color>,
|
||||||
|
pub border_width: Option<i32>,
|
||||||
|
pub title_height: Option<i32>,
|
||||||
|
pub bar_height: Option<i32>,
|
||||||
|
pub font: Option<String>,
|
||||||
|
pub title_font: Option<String>,
|
||||||
|
pub bar_font: Option<String>,
|
||||||
|
pub bar_position: Option<BarPosition>,
|
||||||
|
pub bar_separator_width: Option<i32>,
|
||||||
|
pub gap: Option<i32>,
|
||||||
|
pub floating_titles: Option<bool>,
|
||||||
|
pub title_gap: Option<i32>,
|
||||||
|
pub corner_radius: Option<f32>,
|
||||||
|
pub tab_active_bg_color: Option<Color>,
|
||||||
|
pub tab_active_border_color: Option<Color>,
|
||||||
|
pub tab_inactive_bg_color: Option<Color>,
|
||||||
|
pub tab_inactive_border_color: Option<Color>,
|
||||||
|
pub tab_active_text_color: Option<Color>,
|
||||||
|
pub tab_inactive_text_color: Option<Color>,
|
||||||
|
pub tab_bar_bg_color: Option<Color>,
|
||||||
|
pub tab_attention_bg_color: Option<Color>,
|
||||||
|
pub tab_bar_height: Option<i32>,
|
||||||
|
pub tab_bar_padding: Option<i32>,
|
||||||
|
pub tab_bar_radius: Option<i32>,
|
||||||
|
pub tab_bar_border_width: Option<i32>,
|
||||||
|
pub tab_bar_text_padding: Option<i32>,
|
||||||
|
pub tab_bar_gap: Option<i32>,
|
||||||
|
pub tab_title_align: Option<String>,
|
||||||
|
}
|
||||||
|
|
@ -28,7 +28,6 @@ use {
|
||||||
keyboard::{Keymap, ModifiedKeySym, mods::Modifiers, syms::KeySym},
|
keyboard::{Keymap, ModifiedKeySym, mods::Modifiers, syms::KeySym},
|
||||||
logging::LogLevel,
|
logging::LogLevel,
|
||||||
status::MessageFormat,
|
status::MessageFormat,
|
||||||
theme::{BarPosition, Color},
|
|
||||||
video::{BlendSpace, ColorSpace, Eotf, Format, GfxApi, Transform},
|
video::{BlendSpace, ColorSpace, Eotf, Format, GfxApi, Transform},
|
||||||
window::{ContentType, TileState, WindowType},
|
window::{ContentType, TileState, WindowType},
|
||||||
workspace::WorkspaceDisplayOrder,
|
workspace::WorkspaceDisplayOrder,
|
||||||
|
|
@ -46,7 +45,7 @@ use {
|
||||||
|
|
||||||
pub use jay_config_schema::{
|
pub use jay_config_schema::{
|
||||||
AnimationCurveConfig, Animations, ColorManagement, Float, FocusHistory, Libei, RepeatRate,
|
AnimationCurveConfig, Animations, ColorManagement, Float, FocusHistory, Libei, RepeatRate,
|
||||||
SimpleIm, Tearing, UiDrag, Vrr, Xwayland,
|
SimpleIm, Tearing, Theme, UiDrag, Vrr, Xwayland,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
|
|
@ -205,53 +204,6 @@ pub enum Action {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
|
||||||
pub struct Theme {
|
|
||||||
pub attention_requested_bg_color: Option<Color>,
|
|
||||||
pub bg_color: Option<Color>,
|
|
||||||
pub bar_bg_color: Option<Color>,
|
|
||||||
pub bar_status_text_color: Option<Color>,
|
|
||||||
pub border_color: Option<Color>,
|
|
||||||
pub active_border_color: Option<Color>,
|
|
||||||
pub captured_focused_title_bg_color: Option<Color>,
|
|
||||||
pub captured_unfocused_title_bg_color: Option<Color>,
|
|
||||||
pub focused_inactive_title_bg_color: Option<Color>,
|
|
||||||
pub focused_inactive_title_text_color: Option<Color>,
|
|
||||||
pub focused_title_bg_color: Option<Color>,
|
|
||||||
pub focused_title_text_color: Option<Color>,
|
|
||||||
pub separator_color: Option<Color>,
|
|
||||||
pub unfocused_title_bg_color: Option<Color>,
|
|
||||||
pub unfocused_title_text_color: Option<Color>,
|
|
||||||
pub highlight_color: Option<Color>,
|
|
||||||
pub border_width: Option<i32>,
|
|
||||||
pub title_height: Option<i32>,
|
|
||||||
pub bar_height: Option<i32>,
|
|
||||||
pub font: Option<String>,
|
|
||||||
pub title_font: Option<String>,
|
|
||||||
pub bar_font: Option<String>,
|
|
||||||
pub bar_position: Option<BarPosition>,
|
|
||||||
pub bar_separator_width: Option<i32>,
|
|
||||||
pub gap: Option<i32>,
|
|
||||||
pub floating_titles: Option<bool>,
|
|
||||||
pub title_gap: Option<i32>,
|
|
||||||
pub corner_radius: Option<f32>,
|
|
||||||
pub tab_active_bg_color: Option<Color>,
|
|
||||||
pub tab_active_border_color: Option<Color>,
|
|
||||||
pub tab_inactive_bg_color: Option<Color>,
|
|
||||||
pub tab_inactive_border_color: Option<Color>,
|
|
||||||
pub tab_active_text_color: Option<Color>,
|
|
||||||
pub tab_inactive_text_color: Option<Color>,
|
|
||||||
pub tab_bar_bg_color: Option<Color>,
|
|
||||||
pub tab_attention_bg_color: Option<Color>,
|
|
||||||
pub tab_bar_height: Option<i32>,
|
|
||||||
pub tab_bar_padding: Option<i32>,
|
|
||||||
pub tab_bar_radius: Option<i32>,
|
|
||||||
pub tab_bar_border_width: Option<i32>,
|
|
||||||
pub tab_bar_text_padding: Option<i32>,
|
|
||||||
pub tab_bar_gap: Option<i32>,
|
|
||||||
pub tab_title_align: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Status {
|
pub struct Status {
|
||||||
pub format: MessageFormat,
|
pub format: MessageFormat,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue