refactor: split cargo workspace
This commit is contained in:
parent
5db14936e7
commit
1c21bd1259
695 changed files with 32023 additions and 44964 deletions
11
crates/jay-config-schema/Cargo.toml
Normal file
11
crates/jay-config-schema/Cargo.toml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "jay-config-schema"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
description = "Shared configuration schema declarations for the Jay compositor"
|
||||
repository = "https://github.com/mahkoh/jay"
|
||||
|
||||
[dependencies]
|
||||
ahash = "0.8.11"
|
||||
jay-config = { version = "1.10.0", path = "../jay-config" }
|
||||
59
crates/jay-config-schema/src/action.rs
Normal file
59
crates/jay-config-schema/src/action.rs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
use jay_config::{
|
||||
Direction,
|
||||
input::{LayerDirection, Timeline},
|
||||
};
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum SimpleCommand {
|
||||
Close,
|
||||
DisablePointerConstraint,
|
||||
Focus(Direction),
|
||||
FocusParent,
|
||||
Move(Direction),
|
||||
None,
|
||||
Quit,
|
||||
ReloadConfigToml,
|
||||
ToggleFloating,
|
||||
SetFloating(bool),
|
||||
ToggleFullscreen,
|
||||
SetFullscreen(bool),
|
||||
SendToScratchpad,
|
||||
ToggleScratchpad,
|
||||
CycleScratchpad,
|
||||
Forward(bool),
|
||||
EnableWindowManagement(bool),
|
||||
SetFloatAboveFullscreen(bool),
|
||||
ToggleFloatAboveFullscreen,
|
||||
SetFloatPinned(bool),
|
||||
ToggleFloatPinned,
|
||||
KillClient,
|
||||
ShowBar(bool),
|
||||
ToggleBar,
|
||||
ShowTitles(bool),
|
||||
ToggleTitles,
|
||||
FloatTitles(bool),
|
||||
ToggleFloatTitles,
|
||||
FocusHistory(Timeline),
|
||||
FocusLayerRel(LayerDirection),
|
||||
FocusTiles,
|
||||
ToggleFocusFloatTiled,
|
||||
CreateMark,
|
||||
JumpToMark,
|
||||
PopMode(bool),
|
||||
EnableSimpleIm(bool),
|
||||
ToggleSimpleImEnabled,
|
||||
ReloadSimpleIm,
|
||||
EnableUnicodeInput,
|
||||
WarpMouseToFocus,
|
||||
ToggleTab,
|
||||
MakeGroupH,
|
||||
MakeGroupV,
|
||||
MakeGroupTab,
|
||||
ChangeGroupOpposite,
|
||||
Equalize,
|
||||
EqualizeRecursive,
|
||||
MoveTabLeft,
|
||||
MoveTabRight,
|
||||
SetAutotile(bool),
|
||||
ToggleAutotile,
|
||||
}
|
||||
13
crates/jay-config-schema/src/animations.rs
Normal file
13
crates/jay-config-schema/src/animations.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Animations {
|
||||
pub enabled: Option<bool>,
|
||||
pub duration_ms: Option<u32>,
|
||||
pub style: Option<String>,
|
||||
pub curve: Option<AnimationCurveConfig>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum AnimationCurveConfig {
|
||||
Preset(String),
|
||||
CubicBezier([f32; 4]),
|
||||
}
|
||||
16
crates/jay-config-schema/src/command.rs
Normal file
16
crates/jay-config-schema/src/command.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use jay_config::status::MessageFormat;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Exec {
|
||||
pub prog: String,
|
||||
pub args: Vec<String>,
|
||||
pub envs: Vec<(String, String)>,
|
||||
pub tag: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Status {
|
||||
pub format: MessageFormat,
|
||||
pub exec: Exec,
|
||||
pub separator: Option<String>,
|
||||
}
|
||||
17
crates/jay-config-schema/src/input.rs
Normal file
17
crates/jay-config-schema/src/input.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#[derive(Debug, Clone)]
|
||||
pub enum InputMatch {
|
||||
Any(Vec<InputMatch>),
|
||||
All {
|
||||
tag: Option<String>,
|
||||
name: Option<String>,
|
||||
syspath: Option<String>,
|
||||
devnode: Option<String>,
|
||||
is_keyboard: Option<bool>,
|
||||
is_pointer: Option<bool>,
|
||||
is_touch: Option<bool>,
|
||||
is_tablet_tool: Option<bool>,
|
||||
is_tablet_pad: Option<bool>,
|
||||
is_gesture: Option<bool>,
|
||||
is_switch: Option<bool>,
|
||||
},
|
||||
}
|
||||
8
crates/jay-config-schema/src/keymap.rs
Normal file
8
crates/jay-config-schema/src/keymap.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
use jay_config::keyboard::Keymap;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ConfigKeymap {
|
||||
Named(String),
|
||||
Literal(Keymap),
|
||||
Defined { name: String, map: Keymap },
|
||||
}
|
||||
34
crates/jay-config-schema/src/lib.rs
Normal file
34
crates/jay-config-schema/src/lib.rs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
//! Shared configuration schema declarations for Jay.
|
||||
//!
|
||||
//! This crate is the target home for option structs, defaults, validation
|
||||
//! policy, and docs metadata that need to be consumed by TOML parsing,
|
||||
//! generated config documentation, and compositor-side application code.
|
||||
|
||||
pub mod action;
|
||||
pub mod animations;
|
||||
pub mod command;
|
||||
pub mod input;
|
||||
pub mod keymap;
|
||||
pub mod model;
|
||||
pub mod options;
|
||||
pub mod output;
|
||||
pub mod rules;
|
||||
pub mod theme;
|
||||
|
||||
pub use action::SimpleCommand;
|
||||
pub use animations::{AnimationCurveConfig, Animations};
|
||||
pub use command::{Exec, Status};
|
||||
pub use input::InputMatch;
|
||||
pub use keymap::ConfigKeymap;
|
||||
pub use model::{
|
||||
Action, ClientRule, Config, Input, InputMode, NamedAction, Scratchpad, Shortcut, WindowRule,
|
||||
};
|
||||
pub use options::{
|
||||
ColorManagement, Float, FocusHistory, Libei, RepeatRate, SimpleIm, Tearing, UiDrag, Vrr,
|
||||
Xwayland,
|
||||
};
|
||||
pub use output::{
|
||||
ConfigConnector, ConfigDrmDevice, ConnectorMatch, DrmDeviceMatch, Mode, Output, OutputMatch,
|
||||
};
|
||||
pub use rules::{ClientMatch, GenericMatch, MatchExactly, WindowMatch};
|
||||
pub use theme::Theme;
|
||||
256
crates/jay-config-schema/src/model.rs
Normal file
256
crates/jay-config-schema/src/model.rs
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
use {
|
||||
crate::{
|
||||
Animations, ClientMatch, ColorManagement, ConfigConnector, ConfigDrmDevice, ConfigKeymap,
|
||||
DrmDeviceMatch, Exec, Float, FocusHistory, InputMatch, Libei, Output, OutputMatch,
|
||||
RepeatRate, SimpleCommand, SimpleIm, Status, Tearing, Theme, UiDrag, Vrr, WindowMatch,
|
||||
Xwayland,
|
||||
},
|
||||
ahash::AHashMap,
|
||||
jay_config::{
|
||||
Direction, Workspace,
|
||||
input::{
|
||||
FallbackOutputMode, SwitchEvent, acceleration::AccelProfile, clickmethod::ClickMethod,
|
||||
},
|
||||
keyboard::{ModifiedKeySym, mods::Modifiers, syms::KeySym},
|
||||
logging::LogLevel,
|
||||
video::GfxApi,
|
||||
window::TileState,
|
||||
workspace::WorkspaceDisplayOrder,
|
||||
},
|
||||
std::{rc::Rc, time::Duration},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[expect(clippy::enum_variant_names)]
|
||||
pub enum Action {
|
||||
ConfigureConnector {
|
||||
con: ConfigConnector,
|
||||
},
|
||||
ConfigureDirectScanout {
|
||||
enabled: bool,
|
||||
},
|
||||
ConfigureDrmDevice {
|
||||
dev: ConfigDrmDevice,
|
||||
},
|
||||
ConfigureIdle {
|
||||
idle: Option<Duration>,
|
||||
grace_period: Option<Duration>,
|
||||
},
|
||||
ConfigureInput {
|
||||
input: Box<Input>,
|
||||
},
|
||||
ConfigureOutput {
|
||||
out: Output,
|
||||
},
|
||||
Exec {
|
||||
exec: Exec,
|
||||
},
|
||||
MoveToWorkspace {
|
||||
name: String,
|
||||
},
|
||||
SendToScratchpad {
|
||||
name: String,
|
||||
},
|
||||
ToggleScratchpad {
|
||||
name: String,
|
||||
},
|
||||
CycleScratchpad {
|
||||
name: String,
|
||||
},
|
||||
Multi {
|
||||
actions: Vec<Action>,
|
||||
},
|
||||
SetEnv {
|
||||
env: Vec<(String, String)>,
|
||||
},
|
||||
SetGfxApi {
|
||||
api: GfxApi,
|
||||
},
|
||||
SetKeymap {
|
||||
map: ConfigKeymap,
|
||||
},
|
||||
SetLogLevel {
|
||||
level: LogLevel,
|
||||
},
|
||||
SetRenderDevice {
|
||||
dev: Box<DrmDeviceMatch>,
|
||||
},
|
||||
SetStatus {
|
||||
status: Option<Status>,
|
||||
},
|
||||
SetTheme {
|
||||
theme: Box<Theme>,
|
||||
},
|
||||
ShowWorkspace {
|
||||
name: String,
|
||||
output: Option<OutputMatch>,
|
||||
},
|
||||
SimpleCommand {
|
||||
cmd: SimpleCommand,
|
||||
},
|
||||
SwitchToVt {
|
||||
num: u32,
|
||||
},
|
||||
UnsetEnv {
|
||||
env: Vec<String>,
|
||||
},
|
||||
MoveToOutput {
|
||||
workspace: Option<Workspace>,
|
||||
output: Option<OutputMatch>,
|
||||
direction: Option<Direction>,
|
||||
},
|
||||
SetRepeatRate {
|
||||
rate: RepeatRate,
|
||||
},
|
||||
DefineAction {
|
||||
name: String,
|
||||
action: Box<Action>,
|
||||
},
|
||||
UndefineAction {
|
||||
name: String,
|
||||
},
|
||||
NamedAction {
|
||||
name: String,
|
||||
},
|
||||
CreateMark(u32),
|
||||
JumpToMark(u32),
|
||||
CopyMark(u32, u32),
|
||||
SetMode {
|
||||
name: String,
|
||||
latch: bool,
|
||||
},
|
||||
CreateVirtualOutput {
|
||||
name: String,
|
||||
},
|
||||
RemoveVirtualOutput {
|
||||
name: String,
|
||||
},
|
||||
Resize {
|
||||
dx1: i32,
|
||||
dy1: i32,
|
||||
dx2: i32,
|
||||
dy2: i32,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ClientRule {
|
||||
pub name: Option<String>,
|
||||
pub match_: ClientMatch,
|
||||
pub action: Option<Action>,
|
||||
pub latch: Option<Action>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct WindowRule {
|
||||
pub name: Option<String>,
|
||||
pub match_: WindowMatch,
|
||||
pub action: Option<Action>,
|
||||
pub latch: Option<Action>,
|
||||
pub auto_focus: Option<bool>,
|
||||
pub initial_tile_state: Option<TileState>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Input {
|
||||
pub tag: Option<String>,
|
||||
pub match_: InputMatch,
|
||||
pub accel_profile: Option<AccelProfile>,
|
||||
pub accel_speed: Option<f64>,
|
||||
pub tap_enabled: Option<bool>,
|
||||
pub tap_drag_enabled: Option<bool>,
|
||||
pub tap_drag_lock_enabled: Option<bool>,
|
||||
pub left_handed: Option<bool>,
|
||||
pub natural_scrolling: Option<bool>,
|
||||
pub click_method: Option<ClickMethod>,
|
||||
pub middle_button_emulation: Option<bool>,
|
||||
pub px_per_wheel_scroll: Option<f64>,
|
||||
pub transform_matrix: Option<[[f64; 2]; 2]>,
|
||||
pub keymap: Option<ConfigKeymap>,
|
||||
pub switch_actions: AHashMap<SwitchEvent, Action>,
|
||||
pub output: Option<Option<OutputMatch>>,
|
||||
pub calibration_matrix: Option<[[f32; 3]; 2]>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Shortcut {
|
||||
pub mask: Modifiers,
|
||||
pub keysym: ModifiedKeySym,
|
||||
pub action: Action,
|
||||
pub latch: Option<Action>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct NamedAction {
|
||||
pub name: Rc<String>,
|
||||
pub action: Action,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct InputMode {
|
||||
pub parent: Option<String>,
|
||||
pub shortcuts: Vec<Shortcut>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Config {
|
||||
pub keymap: Option<ConfigKeymap>,
|
||||
pub repeat_rate: Option<RepeatRate>,
|
||||
pub shortcuts: Vec<Shortcut>,
|
||||
pub on_graphics_initialized: Option<Action>,
|
||||
pub on_idle: Option<Action>,
|
||||
pub status: Option<Status>,
|
||||
pub connectors: Vec<ConfigConnector>,
|
||||
pub outputs: Vec<Output>,
|
||||
pub workspace_capture: bool,
|
||||
pub env: Vec<(String, String)>,
|
||||
pub on_startup: Option<Action>,
|
||||
pub keymaps: Vec<ConfigKeymap>,
|
||||
pub auto_reload: Option<bool>,
|
||||
pub log_level: Option<LogLevel>,
|
||||
pub clean_logs_older_than: Option<Duration>,
|
||||
pub theme: Theme,
|
||||
pub gfx_api: Option<GfxApi>,
|
||||
pub direct_scanout_enabled: Option<bool>,
|
||||
pub drm_devices: Vec<ConfigDrmDevice>,
|
||||
pub render_device: Option<DrmDeviceMatch>,
|
||||
pub inputs: Vec<Input>,
|
||||
pub idle: Option<Duration>,
|
||||
pub grace_period: Option<Duration>,
|
||||
pub key_press_enables_dpms: Option<bool>,
|
||||
pub mouse_move_enables_dpms: Option<bool>,
|
||||
pub explicit_sync_enabled: Option<bool>,
|
||||
pub focus_follows_mouse: bool,
|
||||
pub window_management_key: Option<ModifiedKeySym>,
|
||||
pub vrr: Option<Vrr>,
|
||||
pub tearing: Option<Tearing>,
|
||||
pub libei: Libei,
|
||||
pub ui_drag: UiDrag,
|
||||
pub animations: Animations,
|
||||
pub xwayland: Option<Xwayland>,
|
||||
pub color_management: Option<ColorManagement>,
|
||||
pub float: Option<Float>,
|
||||
pub named_actions: Vec<NamedAction>,
|
||||
pub max_action_depth: u64,
|
||||
pub client_rules: Vec<ClientRule>,
|
||||
pub window_rules: Vec<WindowRule>,
|
||||
pub pointer_revert_key: Option<KeySym>,
|
||||
pub use_hardware_cursor: Option<bool>,
|
||||
pub show_bar: Option<bool>,
|
||||
pub show_titles: Option<bool>,
|
||||
pub focus_history: Option<FocusHistory>,
|
||||
pub middle_click_paste: Option<bool>,
|
||||
pub input_modes: AHashMap<String, InputMode>,
|
||||
pub workspace_display_order: Option<WorkspaceDisplayOrder>,
|
||||
pub simple_im: Option<SimpleIm>,
|
||||
pub fallback_output_mode: Option<FallbackOutputMode>,
|
||||
pub mouse_follows_focus: Option<bool>,
|
||||
pub scratchpads: Vec<Scratchpad>,
|
||||
pub autotile: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Scratchpad {
|
||||
pub name: String,
|
||||
pub exec: Option<Exec>,
|
||||
}
|
||||
59
crates/jay-config-schema/src/options.rs
Normal file
59
crates/jay-config-schema/src/options.rs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
use jay_config::{
|
||||
video::{TearingMode, VrrMode},
|
||||
xwayland::XScalingMode,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct UiDrag {
|
||||
pub enabled: Option<bool>,
|
||||
pub threshold: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ColorManagement {
|
||||
pub enabled: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Float {
|
||||
pub show_pin_icon: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct FocusHistory {
|
||||
pub only_visible: Option<bool>,
|
||||
pub same_workspace: Option<bool>,
|
||||
}
|
||||
|
||||
#[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>,
|
||||
}
|
||||
88
crates/jay-config-schema/src/output.rs
Normal file
88
crates/jay-config-schema/src/output.rs
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
use {
|
||||
crate::{Tearing, Vrr},
|
||||
jay_config::video::{BlendSpace, ColorSpace, Eotf, Format, GfxApi, Transform},
|
||||
std::fmt::{Display, Formatter},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum OutputMatch {
|
||||
Any(Vec<OutputMatch>),
|
||||
All {
|
||||
name: Option<String>,
|
||||
connector: Option<String>,
|
||||
serial_number: Option<String>,
|
||||
manufacturer: Option<String>,
|
||||
model: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum DrmDeviceMatch {
|
||||
Any(Vec<DrmDeviceMatch>),
|
||||
All {
|
||||
name: Option<String>,
|
||||
syspath: Option<String>,
|
||||
vendor: Option<u32>,
|
||||
vendor_name: Option<String>,
|
||||
model: Option<u32>,
|
||||
model_name: Option<String>,
|
||||
devnode: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Mode {
|
||||
pub width: i32,
|
||||
pub height: i32,
|
||||
pub refresh_rate: Option<f64>,
|
||||
}
|
||||
|
||||
impl Display for Mode {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{} x {}", self.width, self.height)?;
|
||||
if let Some(rr) = self.refresh_rate {
|
||||
write!(f, " @ {rr}")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Output {
|
||||
pub name: Option<String>,
|
||||
pub match_: OutputMatch,
|
||||
pub x: Option<i32>,
|
||||
pub y: Option<i32>,
|
||||
pub scale: Option<f64>,
|
||||
pub transform: Option<Transform>,
|
||||
pub mode: Option<Mode>,
|
||||
pub vrr: Option<Vrr>,
|
||||
pub tearing: Option<Tearing>,
|
||||
pub format: Option<Format>,
|
||||
pub color_space: Option<ColorSpace>,
|
||||
pub eotf: Option<Eotf>,
|
||||
pub brightness: Option<Option<f64>>,
|
||||
pub blend_space: Option<BlendSpace>,
|
||||
pub use_native_gamut: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ConnectorMatch {
|
||||
Any(Vec<ConnectorMatch>),
|
||||
All { connector: Option<String> },
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ConfigConnector {
|
||||
pub match_: ConnectorMatch,
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ConfigDrmDevice {
|
||||
pub name: Option<String>,
|
||||
pub match_: DrmDeviceMatch,
|
||||
pub gfx_api: Option<GfxApi>,
|
||||
pub direct_scanout_enabled: Option<bool>,
|
||||
pub flip_margin_ms: Option<f64>,
|
||||
}
|
||||
65
crates/jay-config-schema/src/rules.rs
Normal file
65
crates/jay-config-schema/src/rules.rs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
use jay_config::window::{ContentType, WindowType};
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct GenericMatch<Match> {
|
||||
pub name: Option<String>,
|
||||
pub not: Option<Box<Match>>,
|
||||
pub all: Option<Vec<Match>>,
|
||||
pub any: Option<Vec<Match>>,
|
||||
pub exactly: Option<MatchExactly<Match>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct MatchExactly<Match> {
|
||||
pub num: usize,
|
||||
pub list: Vec<Match>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct ClientMatch {
|
||||
pub generic: GenericMatch<Self>,
|
||||
pub sandbox_engine: Option<String>,
|
||||
pub sandbox_engine_regex: Option<String>,
|
||||
pub sandbox_app_id: Option<String>,
|
||||
pub sandbox_app_id_regex: Option<String>,
|
||||
pub sandbox_instance_id: Option<String>,
|
||||
pub sandbox_instance_id_regex: Option<String>,
|
||||
pub sandboxed: Option<bool>,
|
||||
pub uid: Option<i32>,
|
||||
pub pid: Option<i32>,
|
||||
pub is_xwayland: Option<bool>,
|
||||
pub comm: Option<String>,
|
||||
pub comm_regex: Option<String>,
|
||||
pub exe: Option<String>,
|
||||
pub exe_regex: Option<String>,
|
||||
pub tag: Option<String>,
|
||||
pub tag_regex: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct WindowMatch {
|
||||
pub generic: GenericMatch<Self>,
|
||||
pub types: Option<WindowType>,
|
||||
pub client: Option<ClientMatch>,
|
||||
pub title: Option<String>,
|
||||
pub title_regex: Option<String>,
|
||||
pub app_id: Option<String>,
|
||||
pub app_id_regex: Option<String>,
|
||||
pub floating: Option<bool>,
|
||||
pub visible: Option<bool>,
|
||||
pub urgent: Option<bool>,
|
||||
pub focused: Option<bool>,
|
||||
pub fullscreen: Option<bool>,
|
||||
pub just_mapped: Option<bool>,
|
||||
pub tag: Option<String>,
|
||||
pub tag_regex: Option<String>,
|
||||
pub x_class: Option<String>,
|
||||
pub x_class_regex: Option<String>,
|
||||
pub x_instance: Option<String>,
|
||||
pub x_instance_regex: Option<String>,
|
||||
pub x_role: Option<String>,
|
||||
pub x_role_regex: Option<String>,
|
||||
pub workspace: Option<String>,
|
||||
pub workspace_regex: Option<String>,
|
||||
pub content_types: Option<ContentType>,
|
||||
}
|
||||
48
crates/jay-config-schema/src/theme.rs
Normal file
48
crates/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>,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue