docs(config): encode defaults of unwrapped options into schema

This commit ensures that the various default values that the different
Option<T> config properties can be unwrapped to are encoded by schemars
so that they can be picked up by docgen.
This commit is contained in:
LGUG2Z
2025-12-26 18:16:55 -08:00
parent 66c5766848
commit a42e809ade
13 changed files with 709 additions and 396 deletions
+5 -3
View File
@@ -75,9 +75,11 @@ trace target $RUST_LOG="trace":
deadlock $RUST_LOG="trace": deadlock $RUST_LOG="trace":
cargo +stable run --bin komorebi --locked --no-default-features --features deadlock_detection cargo +stable run --bin komorebi --locked --no-default-features --features deadlock_detection
docgen: docgen starlight:
cargo run --package komorebic -- docgen rm {{ starlight }}/src/data/cli/windows/*.md
Get-ChildItem -Path "docs/cli" -Recurse -File | ForEach-Object { (Get-Content $_.FullName) -replace 'Usage: ', 'Usage: komorebic.exe ' | Set-Content $_.FullName } cargo run --package komorebic -- docgen --output {{ starlight }}/src/data/cli/windows
schemars-docgen ./schema.json --output {{ starlight }}/src/content/docs/reference/komorebi-windows.mdx --format mdx --title "komorebi.json (Windows)" --description "komorebi for Windows configuration schema reference"
schemars-docgen ./schema.bar.json --output {{ starlight }}/src/content/docs/reference/bar-windows.mdx --format mdx --title "komorebi.bar.json (Windows)" --description "komorebi-bar for Windows configuration schema reference"
jsonschema: jsonschema:
cargo run --package komorebic -- static-config-schema > schema.json cargo run --package komorebic -- static-config-schema > schema.json
+32 -10
View File
@@ -14,11 +14,24 @@ use serde::Serialize;
use std::collections::HashMap; use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;
mod defaults {
pub const HEIGHT: f32 = 50.0;
pub const FONT_SIZE: f32 = 12.5;
pub const ICON_SCALE: f32 = 1.4;
pub const MAX_LABEL_WIDTH: f32 = 400.0;
pub const TRANSPARENCY_ALPHA: u8 = 200;
pub const WIDGET_SPACING: f32 = 10.0;
pub const SCROLL_THRESHOLD: f32 = 30.0;
pub const FOCUS_MONITOR_AT_CURSOR: bool = true;
pub const IGNORE_MOUSE_FOLLOWS_FOCUS: bool = true;
}
#[derive(Clone, Debug, Serialize, Deserialize)] #[derive(Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
/// The `komorebi.bar.json` configuration file reference for `v0.1.40` /// The `komorebi.bar.json` configuration file reference for `v0.1.40`
pub struct KomobarConfig { pub struct KomobarConfig {
/// Bar height (default: 50) /// Bar height
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::HEIGHT)))]
pub height: Option<f32>, pub height: Option<f32>,
/// Bar padding. Use one value for all sides or use a grouped padding for horizontal and/or /// Bar padding. Use one value for all sides or use a grouped padding for horizontal and/or
/// vertical definition which can each take a single value for a symmetric padding or two /// vertical definition which can each take a single value for a symmetric padding or two
@@ -79,17 +92,22 @@ pub struct KomobarConfig {
pub monitor: MonitorConfigOrIndex, pub monitor: MonitorConfigOrIndex,
/// Font family /// Font family
pub font_family: Option<String>, pub font_family: Option<String>,
/// Font size (default: 12.5) /// Font size
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::FONT_SIZE)))]
pub font_size: Option<f32>, pub font_size: Option<f32>,
/// Scale of the icons relative to the font_size [[1.0-2.0]]. (default: 1.4) /// Scale of the icons relative to the font_size [[1.0-2.0]]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::ICON_SCALE)))]
pub icon_scale: Option<f32>, pub icon_scale: Option<f32>,
/// Max label width before text truncation (default: 400.0) /// Max label width before text truncation
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::MAX_LABEL_WIDTH)))]
pub max_label_width: Option<f32>, pub max_label_width: Option<f32>,
/// Theme /// Theme
pub theme: Option<KomobarTheme>, pub theme: Option<KomobarTheme>,
/// Alpha value for the color transparency [[0-255]] (default: 200) /// Alpha value for the color transparency [[0-255]]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::TRANSPARENCY_ALPHA)))]
pub transparency_alpha: Option<u8>, pub transparency_alpha: Option<u8>,
/// Spacing between widgets (default: 10.0) /// Spacing between widgets
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::WIDGET_SPACING)))]
pub widget_spacing: Option<f32>, pub widget_spacing: Option<f32>,
/// Visual grouping for widgets /// Visual grouping for widgets
pub grouping: Option<Grouping>, pub grouping: Option<Grouping>,
@@ -380,9 +398,11 @@ pub enum MouseMessage {
#[derive(Clone, Debug, Serialize, Deserialize)] #[derive(Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct KomorebiMouseMessage { pub struct KomorebiMouseMessage {
/// Send the FocusMonitorAtCursor message (default:true) /// Send the FocusMonitorAtCursor message
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::FOCUS_MONITOR_AT_CURSOR)))]
pub focus_monitor_at_cursor: Option<bool>, pub focus_monitor_at_cursor: Option<bool>,
/// Wrap the {message} with a MouseFollowsFocus(false) and MouseFollowsFocus({original.value}) message (default:true) /// Wrap the {message} with a MouseFollowsFocus(false) and MouseFollowsFocus({original.value}) message
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::IGNORE_MOUSE_FOLLOWS_FOCUS)))]
pub ignore_mouse_follows_focus: Option<bool>, pub ignore_mouse_follows_focus: Option<bool>,
/// The message to send to the komorebi client /// The message to send to the komorebi client
pub message: komorebi_client::SocketMessage, pub message: komorebi_client::SocketMessage,
@@ -402,14 +422,16 @@ pub struct MouseConfig {
/// Command to send on extra2/forward button click /// Command to send on extra2/forward button click
pub on_extra2_click: Option<MouseMessage>, pub on_extra2_click: Option<MouseMessage>,
/// Defines how many points a user needs to scroll vertically to make a "tick" on a mouse/touchpad/touchscreen (default: 30) /// Defines how many points a user needs to scroll vertically to make a "tick" on a mouse/touchpad/touchscreen
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::SCROLL_THRESHOLD)))]
pub vertical_scroll_threshold: Option<f32>, pub vertical_scroll_threshold: Option<f32>,
/// Command to send on scrolling up (every tick) /// Command to send on scrolling up (every tick)
pub on_scroll_up: Option<MouseMessage>, pub on_scroll_up: Option<MouseMessage>,
/// Command to send on scrolling down (every tick) /// Command to send on scrolling down (every tick)
pub on_scroll_down: Option<MouseMessage>, pub on_scroll_down: Option<MouseMessage>,
/// Defines how many points a user needs to scroll horizontally to make a "tick" on a mouse/touchpad/touchscreen (default: 30) /// Defines how many points a user needs to scroll horizontally to make a "tick" on a mouse/touchpad/touchscreen
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::SCROLL_THRESHOLD)))]
pub horizontal_scroll_threshold: Option<f32>, pub horizontal_scroll_threshold: Option<f32>,
/// Command to send on scrolling left (every tick) /// Command to send on scrolling left (every tick)
pub on_scroll_left: Option<MouseMessage>, pub on_scroll_left: Option<MouseMessage>,
+9 -2
View File
@@ -17,6 +17,10 @@ use std::process::Command;
use std::time::Duration; use std::time::Duration;
use std::time::Instant; use std::time::Instant;
mod defaults {
pub const DATA_REFRESH_INTERVAL: u64 = 10;
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)] #[derive(Copy, Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct BatteryConfig { pub struct BatteryConfig {
@@ -24,7 +28,8 @@ pub struct BatteryConfig {
pub enable: bool, pub enable: bool,
/// Hide the widget if the battery is at full charge /// Hide the widget if the battery is at full charge
pub hide_on_full_charge: Option<bool>, pub hide_on_full_charge: Option<bool>,
/// Data refresh interval (default: 10 seconds) /// Data refresh interval in seconds
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DATA_REFRESH_INTERVAL)))]
pub data_refresh_interval: Option<u64>, pub data_refresh_interval: Option<u64>,
/// Display label prefix /// Display label prefix
pub label_prefix: Option<LabelPrefix>, pub label_prefix: Option<LabelPrefix>,
@@ -34,7 +39,9 @@ pub struct BatteryConfig {
impl From<BatteryConfig> for Battery { impl From<BatteryConfig> for Battery {
fn from(value: BatteryConfig) -> Self { fn from(value: BatteryConfig) -> Self {
let data_refresh_interval = value.data_refresh_interval.unwrap_or(10); let data_refresh_interval = value
.data_refresh_interval
.unwrap_or(defaults::DATA_REFRESH_INTERVAL);
Self { Self {
enable: value.enable, enable: value.enable,
+9 -2
View File
@@ -16,12 +16,17 @@ use std::time::Instant;
use sysinfo::RefreshKind; use sysinfo::RefreshKind;
use sysinfo::System; use sysinfo::System;
mod defaults {
pub const DATA_REFRESH_INTERVAL: u64 = 10;
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)] #[derive(Copy, Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct CpuConfig { pub struct CpuConfig {
/// Enable the Cpu widget /// Enable the Cpu widget
pub enable: bool, pub enable: bool,
/// Data refresh interval (default: 10 seconds) /// Data refresh interval in seconds
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DATA_REFRESH_INTERVAL)))]
pub data_refresh_interval: Option<u64>, pub data_refresh_interval: Option<u64>,
/// Display label prefix /// Display label prefix
pub label_prefix: Option<LabelPrefix>, pub label_prefix: Option<LabelPrefix>,
@@ -31,7 +36,9 @@ pub struct CpuConfig {
impl From<CpuConfig> for Cpu { impl From<CpuConfig> for Cpu {
fn from(value: CpuConfig) -> Self { fn from(value: CpuConfig) -> Self {
let data_refresh_interval = value.data_refresh_interval.unwrap_or(10); let data_refresh_interval = value
.data_refresh_interval
.unwrap_or(defaults::DATA_REFRESH_INTERVAL);
Self { Self {
enable: value.enable, enable: value.enable,
+8 -5
View File
@@ -21,15 +21,18 @@ use windows::Win32::UI::Input::KeyboardAndMouse::GetKeyboardLayout;
use windows::Win32::UI::WindowsAndMessaging::GetForegroundWindow; use windows::Win32::UI::WindowsAndMessaging::GetForegroundWindow;
use windows::Win32::UI::WindowsAndMessaging::GetWindowThreadProcessId; use windows::Win32::UI::WindowsAndMessaging::GetWindowThreadProcessId;
const DEFAULT_DATA_REFRESH_INTERVAL: u64 = 1; mod defaults {
const ERROR_TEXT: &str = "Error"; pub const DATA_REFRESH_INTERVAL: u64 = 10;
pub const ERROR_TEXT: &str = "Error";
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)] #[derive(Copy, Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct KeyboardConfig { pub struct KeyboardConfig {
/// Enable the Input widget /// Enable the Input widget
pub enable: bool, pub enable: bool,
/// Data refresh interval (default: 1 second) /// Data refresh interval
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DATA_REFRESH_INTERVAL)))]
pub data_refresh_interval: Option<u64>, pub data_refresh_interval: Option<u64>,
/// Display label prefix /// Display label prefix
pub label_prefix: Option<LabelPrefix>, pub label_prefix: Option<LabelPrefix>,
@@ -39,7 +42,7 @@ impl From<KeyboardConfig> for Keyboard {
fn from(value: KeyboardConfig) -> Self { fn from(value: KeyboardConfig) -> Self {
let data_refresh_interval = value let data_refresh_interval = value
.data_refresh_interval .data_refresh_interval
.unwrap_or(DEFAULT_DATA_REFRESH_INTERVAL); .unwrap_or(defaults::DATA_REFRESH_INTERVAL);
Self { Self {
enable: value.enable, enable: value.enable,
@@ -124,7 +127,7 @@ fn get_active_keyboard_layout() -> eyre::Result<String, ()> {
fn get_lang() -> String { fn get_lang() -> String {
get_active_keyboard_layout() get_active_keyboard_layout()
.map(|l| l.trim_end_matches('\0').to_string()) .map(|l| l.trim_end_matches('\0').to_string())
.unwrap_or_else(|_| ERROR_TEXT.to_string()) .unwrap_or_else(|_| defaults::ERROR_TEXT.to_string())
} }
impl Keyboard { impl Keyboard {
+9 -2
View File
@@ -16,12 +16,17 @@ use std::time::Instant;
use sysinfo::RefreshKind; use sysinfo::RefreshKind;
use sysinfo::System; use sysinfo::System;
mod defaults {
pub const DATA_REFRESH_INTERVAL: u64 = 10;
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)] #[derive(Copy, Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct MemoryConfig { pub struct MemoryConfig {
/// Enable the Memory widget /// Enable the Memory widget
pub enable: bool, pub enable: bool,
/// Data refresh interval (default: 10 seconds) /// Data refresh interval in seconds
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DATA_REFRESH_INTERVAL)))]
pub data_refresh_interval: Option<u64>, pub data_refresh_interval: Option<u64>,
/// Display label prefix /// Display label prefix
pub label_prefix: Option<LabelPrefix>, pub label_prefix: Option<LabelPrefix>,
@@ -31,7 +36,9 @@ pub struct MemoryConfig {
impl From<MemoryConfig> for Memory { impl From<MemoryConfig> for Memory {
fn from(value: MemoryConfig) -> Self { fn from(value: MemoryConfig) -> Self {
let data_refresh_interval = value.data_refresh_interval.unwrap_or(10); let data_refresh_interval = value
.data_refresh_interval
.unwrap_or(defaults::DATA_REFRESH_INTERVAL);
Self { Self {
enable: value.enable, enable: value.enable,
+9 -2
View File
@@ -24,6 +24,10 @@ use std::time::Duration;
use std::time::Instant; use std::time::Instant;
use sysinfo::Networks; use sysinfo::Networks;
mod defaults {
pub const DATA_REFRESH_INTERVAL: u64 = 10;
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)] #[derive(Copy, Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct NetworkConfig { pub struct NetworkConfig {
@@ -40,7 +44,8 @@ pub struct NetworkConfig {
/// Characters to reserve for received and transmitted activity /// Characters to reserve for received and transmitted activity
#[serde(alias = "network_activity_fill_characters")] #[serde(alias = "network_activity_fill_characters")]
pub activity_left_padding: Option<usize>, pub activity_left_padding: Option<usize>,
/// Data refresh interval (default: 10 seconds) /// Data refresh interval in seconds
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DATA_REFRESH_INTERVAL)))]
pub data_refresh_interval: Option<u64>, pub data_refresh_interval: Option<u64>,
/// Display label prefix /// Display label prefix
pub label_prefix: Option<LabelPrefix>, pub label_prefix: Option<LabelPrefix>,
@@ -64,7 +69,9 @@ pub struct NetworkSelectConfig {
impl From<NetworkConfig> for Network { impl From<NetworkConfig> for Network {
fn from(value: NetworkConfig) -> Self { fn from(value: NetworkConfig) -> Self {
let default_refresh_interval = 10; let default_refresh_interval = 10;
let data_refresh_interval = value.data_refresh_interval.unwrap_or(10); let data_refresh_interval = value
.data_refresh_interval
.unwrap_or(defaults::DATA_REFRESH_INTERVAL);
Self { Self {
enable: value.enable, enable: value.enable,
+21 -6
View File
@@ -16,18 +16,27 @@ use std::time::Duration;
use std::time::Instant; use std::time::Instant;
use sysinfo::Disks; use sysinfo::Disks;
mod defaults {
pub const DATA_REFRESH_INTERVAL: u64 = 10;
pub const SHOW_READ_ONLY_DISKS: bool = false;
pub const SHOW_REMOVABLE_DISKS: bool = true;
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)] #[derive(Copy, Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct StorageConfig { pub struct StorageConfig {
/// Enable the Storage widget /// Enable the Storage widget
pub enable: bool, pub enable: bool,
/// Data refresh interval (default: 10 seconds) /// Data refresh interval in seconds
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DATA_REFRESH_INTERVAL)))]
pub data_refresh_interval: Option<u64>, pub data_refresh_interval: Option<u64>,
/// Display label prefix /// Display label prefix
pub label_prefix: Option<LabelPrefix>, pub label_prefix: Option<LabelPrefix>,
/// Show disks that are read only. (default: false) /// Show disks that are read only
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::SHOW_READ_ONLY_DISKS)))]
pub show_read_only_disks: Option<bool>, pub show_read_only_disks: Option<bool>,
/// Show removable disks. (default: true) /// Show removable disks
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::SHOW_REMOVABLE_DISKS)))]
pub show_removable_disks: Option<bool>, pub show_removable_disks: Option<bool>,
/// Select when the current percentage is over this value [[1-100]] /// Select when the current percentage is over this value [[1-100]]
pub auto_select_over: Option<u8>, pub auto_select_over: Option<u8>,
@@ -40,10 +49,16 @@ impl From<StorageConfig> for Storage {
Self { Self {
enable: value.enable, enable: value.enable,
disks: Disks::new_with_refreshed_list(), disks: Disks::new_with_refreshed_list(),
data_refresh_interval: value.data_refresh_interval.unwrap_or(10), data_refresh_interval: value
.data_refresh_interval
.unwrap_or(defaults::DATA_REFRESH_INTERVAL),
label_prefix: value.label_prefix.unwrap_or(LabelPrefix::IconAndText), label_prefix: value.label_prefix.unwrap_or(LabelPrefix::IconAndText),
show_read_only_disks: value.show_read_only_disks.unwrap_or(false), show_read_only_disks: value
show_removable_disks: value.show_removable_disks.unwrap_or(true), .show_read_only_disks
.unwrap_or(defaults::SHOW_READ_ONLY_DISKS),
show_removable_disks: value
.show_removable_disks
.unwrap_or(defaults::SHOW_REMOVABLE_DISKS),
auto_select_over: value.auto_select_over.map(|o| o.clamp(1, 100)), auto_select_over: value.auto_select_over.map(|o| o.clamp(1, 100)),
auto_hide_under: value.auto_hide_under.map(|o| o.clamp(1, 100)), auto_hide_under: value.auto_hide_under.map(|o| o.clamp(1, 100)),
last_updated: Instant::now(), last_updated: Instant::now(),
+1 -1
View File
@@ -92,7 +92,7 @@ pub struct TimeConfig {
///} ///}
/// ``` /// ```
pub timezone: Option<String>, pub timezone: Option<String>,
/// Change the icon depending on the time. The default icon is used between 8:30 and 12:00. (default: false) /// Change the icon depending on the time. The default icon is used between 8:30 and 12:00
pub changing_icon: Option<bool>, pub changing_icon: Option<bool>,
} }
+9 -2
View File
@@ -14,12 +14,17 @@ use std::process::Command;
use std::time::Duration; use std::time::Duration;
use std::time::Instant; use std::time::Instant;
mod defaults {
pub const DATA_REFRESH_INTERVAL: u64 = 12;
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)] #[derive(Copy, Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct UpdateConfig { pub struct UpdateConfig {
/// Enable the Update widget /// Enable the Update widget
pub enable: bool, pub enable: bool,
/// Data refresh interval (default: 12 hours) /// Data refresh interval in hours
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DATA_REFRESH_INTERVAL)))]
pub data_refresh_interval: Option<u64>, pub data_refresh_interval: Option<u64>,
/// Display label prefix /// Display label prefix
pub label_prefix: Option<LabelPrefix>, pub label_prefix: Option<LabelPrefix>,
@@ -27,7 +32,9 @@ pub struct UpdateConfig {
impl From<UpdateConfig> for Update { impl From<UpdateConfig> for Update {
fn from(value: UpdateConfig) -> Self { fn from(value: UpdateConfig) -> Self {
let data_refresh_interval = value.data_refresh_interval.unwrap_or(12); let data_refresh_interval = value
.data_refresh_interval
.unwrap_or(defaults::DATA_REFRESH_INTERVAL);
let mut latest_version = String::new(); let mut latest_version = String::new();
+219 -107
View File
@@ -106,6 +106,25 @@ use std::sync::atomic::Ordering;
use uds_windows::UnixListener; use uds_windows::UnixListener;
use uds_windows::UnixStream; use uds_windows::UnixStream;
mod defaults {
pub const RESIZE_DELTA: i32 = 50;
pub const BORDER_WIDTH: i32 = 8;
pub const BORDER_OFFSET: i32 = -1;
pub const BORDER_ENABLED: bool = true;
pub const TRANSPARENCY_ENABLED: bool = false;
pub const TRANSPARENCY_ALPHA: u8 = 200;
pub const DEFAULT_WORKSPACE_PADDING: i32 = 10;
pub const DEFAULT_CONTAINER_PADDING: i32 = 10;
pub const MOUSE_FOLLOWS_FOCUS: bool = true;
pub const FLOAT_OVERRIDE: bool = false;
pub const TILE: bool = true;
pub const APPLY_WINDOW_BASED_WORK_AREA_OFFSET: bool = true;
pub const WINDOW_BASED_WORK_AREA_OFFSET_LIMIT: isize = 1;
pub const GENERATE_THEME: bool = true;
pub const ANIMATION_FPS: u64 = 60;
pub const SLOW_APPLICATION_COMPENSATION_TIME: u64 = 20;
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct BorderColours { pub struct BorderColours {
@@ -132,38 +151,49 @@ pub struct BorderColours {
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct ThemeOptions { pub struct ThemeOptions {
/// Specify Light or Dark variant for theme generation (default: Dark) /// Specify Light or Dark variant for theme generation
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::ThemeVariant::Dark)))]
pub theme_variant: Option<komorebi_themes::ThemeVariant>, pub theme_variant: Option<komorebi_themes::ThemeVariant>,
/// Border colour when the container contains a single window (default: Base0D) /// Border colour when the container contains a single window
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0D)))]
pub single_border: Option<komorebi_themes::Base16Value>, pub single_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container contains multiple windows (default: Base0B) /// Border colour when the container contains multiple windows
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0B)))]
pub stack_border: Option<komorebi_themes::Base16Value>, pub stack_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is in monocle mode (default: Base0F) /// Border colour when the container is in monocle mode
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0F)))]
pub monocle_border: Option<komorebi_themes::Base16Value>, pub monocle_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the window is floating (default: Base09) /// Border colour when the window is floating
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base09)))]
pub floating_border: Option<komorebi_themes::Base16Value>, pub floating_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is unfocused (default: Base01) /// Border colour when the container is unfocused
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base01)))]
pub unfocused_border: Option<komorebi_themes::Base16Value>, pub unfocused_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is unfocused and locked (default: Base08) /// Border colour when the container is unfocused and locked
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base08)))]
pub unfocused_locked_border: Option<komorebi_themes::Base16Value>, pub unfocused_locked_border: Option<komorebi_themes::Base16Value>,
/// Stackbar focused tab text colour (default: Base0B) /// Stackbar focused tab text colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0B)))]
pub stackbar_focused_text: Option<komorebi_themes::Base16Value>, pub stackbar_focused_text: Option<komorebi_themes::Base16Value>,
/// Stackbar unfocused tab text colour (default: Base05) /// Stackbar unfocused tab text colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base05)))]
pub stackbar_unfocused_text: Option<komorebi_themes::Base16Value>, pub stackbar_unfocused_text: Option<komorebi_themes::Base16Value>,
/// Stackbar tab background colour (default: Base01) /// Stackbar tab background colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base01)))]
pub stackbar_background: Option<komorebi_themes::Base16Value>, pub stackbar_background: Option<komorebi_themes::Base16Value>,
/// Komorebi status bar accent (default: Base0D) /// Komorebi status bar accent
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0D)))]
pub bar_accent: Option<komorebi_themes::Base16Value>, pub bar_accent: Option<komorebi_themes::Base16Value>,
} }
@@ -174,11 +204,13 @@ pub struct Wallpaper {
/// Path to the wallpaper image file /// Path to the wallpaper image file
#[serde_as(as = "ResolvedPathBuf")] #[serde_as(as = "ResolvedPathBuf")]
pub path: PathBuf, pub path: PathBuf,
/// Generate and apply Base16 theme for this wallpaper (default: true) /// Generate and apply Base16 theme for this wallpaper
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::GENERATE_THEME)))]
pub generate_theme: Option<bool>, pub generate_theme: Option<bool>,
/// Specify Light or Dark variant for theme generation (default: Dark) /// Specify Light or Dark variant for theme generation
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::ThemeVariant::Dark)))]
pub theme_options: Option<ThemeOptions>, pub theme_options: Option<ThemeOptions>,
} }
@@ -189,21 +221,22 @@ pub struct Wallpaper {
pub struct WorkspaceConfig { pub struct WorkspaceConfig {
/// Name /// Name
pub name: String, pub name: String,
/// Layout (default: BSP) /// Layout
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = DefaultLayout::BSP)))]
pub layout: Option<DefaultLayout>, pub layout: Option<DefaultLayout>,
/// Layout-specific options (default: None) /// Layout-specific options
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub layout_options: Option<LayoutOptions>, pub layout_options: Option<LayoutOptions>,
/// END OF LIFE FEATURE: Custom Layout (default: None) /// END OF LIFE FEATURE: Custom Layout
#[deprecated(note = "End of life feature")] #[deprecated(note = "End of life feature")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[serde_as(as = "Option<ResolvedPathBuf>")] #[serde_as(as = "Option<ResolvedPathBuf>")]
pub custom_layout: Option<PathBuf>, pub custom_layout: Option<PathBuf>,
/// Layout rules in the format of threshold => layout (default: None) /// Layout rules in the format of threshold => layout
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub layout_rules: Option<HashMap<usize, DefaultLayout>>, pub layout_rules: Option<HashMap<usize, DefaultLayout>>,
/// END OF LIFE FEATURE: Custom layout rules (default: None) /// END OF LIFE FEATURE: Custom layout rules
#[deprecated(note = "End of life feature")] #[deprecated(note = "End of life feature")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[serde(deserialize_with = "resolve_option_hashmap_usize_path", default)] #[serde(deserialize_with = "resolve_option_hashmap_usize_path", default)]
@@ -220,29 +253,34 @@ pub struct WorkspaceConfig {
/// Permanent workspace application rules /// Permanent workspace application rules
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub workspace_rules: Option<Vec<MatchingRule>>, pub workspace_rules: Option<Vec<MatchingRule>>,
/// Workspace specific work area offset (default: None) /// Workspace specific work area offset
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub work_area_offset: Option<Rect>, pub work_area_offset: Option<Rect>,
/// Apply this monitor's window-based work area offset (default: true) /// Apply this monitor's window-based work area offset
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::APPLY_WINDOW_BASED_WORK_AREA_OFFSET)))]
pub apply_window_based_work_area_offset: Option<bool>, pub apply_window_based_work_area_offset: Option<bool>,
/// Determine what happens when a new window is opened (default: Create) /// Determine what happens when a new window is opened
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = WindowContainerBehaviour::Create)))]
pub window_container_behaviour: Option<WindowContainerBehaviour>, pub window_container_behaviour: Option<WindowContainerBehaviour>,
/// Window container behaviour rules in the format of threshold => behaviour (default: None) /// Window container behaviour rules in the format of threshold => behaviour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub window_container_behaviour_rules: Option<HashMap<usize, WindowContainerBehaviour>>, pub window_container_behaviour_rules: Option<HashMap<usize, WindowContainerBehaviour>>,
/// Enable or disable float override, which makes it so every new window opens in floating mode (default: false) /// Enable or disable float override, which makes it so every new window opens in floating mode
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::FLOAT_OVERRIDE)))]
pub float_override: Option<bool>, pub float_override: Option<bool>,
/// Enable or disable tiling for the workspace (default: true) /// Enable or disable tiling for the workspace
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::TILE)))]
pub tile: Option<bool>, pub tile: Option<bool>,
/// Specify an axis on which to flip the selected layout (default: None) /// Specify an axis on which to flip the selected layout
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub layout_flip: Option<Axis>, pub layout_flip: Option<Axis>,
/// Determine what happens to a new window when the Floating workspace layer is active (default: Tile) /// Determine what happens to a new window when the Floating workspace layer is active
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = FloatingLayerBehaviour::Tile)))]
pub floating_layer_behaviour: Option<FloatingLayerBehaviour>, pub floating_layer_behaviour: Option<FloatingLayerBehaviour>,
/// Specify a wallpaper for this workspace /// Specify a wallpaper for this workspace
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@@ -340,14 +378,15 @@ impl From<&Workspace> for WorkspaceConfig {
pub struct MonitorConfig { pub struct MonitorConfig {
/// Workspace configurations /// Workspace configurations
pub workspaces: Vec<WorkspaceConfig>, pub workspaces: Vec<WorkspaceConfig>,
/// Monitor-specific work area offset (default: None) /// Monitor-specific work area offset
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub work_area_offset: Option<Rect>, pub work_area_offset: Option<Rect>,
/// Window based work area offset (default: None) /// Window based work area offset
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub window_based_work_area_offset: Option<Rect>, pub window_based_work_area_offset: Option<Rect>,
/// Open window limit after which the window based work area offset will no longer be applied (default: 1) /// Open window limit after which the window based work area offset will no longer be applied
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::WINDOW_BASED_WORK_AREA_OFFSET_LIMIT)))]
pub window_based_work_area_offset_limit: Option<isize>, pub window_based_work_area_offset_limit: Option<isize>,
/// Container padding (default: global) /// Container padding (default: global)
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@@ -358,8 +397,9 @@ pub struct MonitorConfig {
/// Specify a wallpaper for this monitor /// Specify a wallpaper for this monitor
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub wallpaper: Option<Wallpaper>, pub wallpaper: Option<Wallpaper>,
/// Determine what happens to a new window when the Floating workspace layer is active (default: Tile) /// Determine what happens to a new window when the Floating workspace layer is active
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = FloatingLayerBehaviour::Tile)))]
pub floating_layer_behaviour: Option<FloatingLayerBehaviour>, pub floating_layer_behaviour: Option<FloatingLayerBehaviour>,
} }
@@ -428,43 +468,49 @@ pub struct StaticConfig {
/// DISCOURAGED: Minimum height for a window to be eligible for tiling /// DISCOURAGED: Minimum height for a window to be eligible for tiling
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub minimum_window_height: Option<i32>, pub minimum_window_height: Option<i32>,
/// Delta to resize windows by (default 50) /// Delta to resize windows by
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::RESIZE_DELTA)))]
pub resize_delta: Option<i32>, pub resize_delta: Option<i32>,
/// Determine what happens when a new window is opened (default: Create) /// Determine what happens when a new window is opened
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = WindowContainerBehaviour::Create)))]
pub window_container_behaviour: Option<WindowContainerBehaviour>, pub window_container_behaviour: Option<WindowContainerBehaviour>,
/// Enable or disable float override, which makes it so every new window opens in floating mode /// Enable or disable float override, which makes it so every new window opens in floating mode
/// (default: false)
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::FLOAT_OVERRIDE)))]
pub float_override: Option<bool>, pub float_override: Option<bool>,
/// Determines what happens on a new window when on the `FloatingLayer` /// Determines what happens on a new window when on the `FloatingLayer`
/// (default: Tile)
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = FloatingLayerBehaviour::Tile)))]
pub floating_layer_behaviour: Option<FloatingLayerBehaviour>, pub floating_layer_behaviour: Option<FloatingLayerBehaviour>,
/// Determines the placement of a new window when toggling to float (default: CenterAndResize) /// Determines the placement of a new window when toggling to float
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = Placement::CenterAndResize)))]
pub toggle_float_placement: Option<Placement>, pub toggle_float_placement: Option<Placement>,
/// Determines the `Placement` to be used when spawning a window on the floating layer with the /// Determines the `Placement` to be used when spawning a window on the floating layer with the
/// `FloatingLayerBehaviour` set to `FloatingLayerBehaviour::Float` (default: Center) /// `FloatingLayerBehaviour` set to `FloatingLayerBehaviour::Float`
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = Placement::Center)))]
pub floating_layer_placement: Option<Placement>, pub floating_layer_placement: Option<Placement>,
/// Determines the `Placement` to be used when spawning a window with float override active /// Determines the `Placement` to be used when spawning a window with float override active
/// (default: None)
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub float_override_placement: Option<Placement>, pub float_override_placement: Option<Placement>,
/// Determines the `Placement` to be used when spawning a window that matches a /// Determines the `Placement` to be used when spawning a window that matches a
/// `floating_applications` rule (default: None) /// `floating_applications` rule
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub float_rule_placement: Option<Placement>, pub float_rule_placement: Option<Placement>,
/// Determine what happens when a window is moved across a monitor boundary (default: Swap) /// Determine what happens when a window is moved across a monitor boundary
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = MoveBehaviour::Swap)))]
pub cross_monitor_move_behaviour: Option<MoveBehaviour>, pub cross_monitor_move_behaviour: Option<MoveBehaviour>,
/// Determine what happens when an action is called on a window at a monitor boundary (default: Monitor) /// Determine what happens when an action is called on a window at a monitor boundary
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = CrossBoundaryBehaviour::Monitor)))]
pub cross_boundary_behaviour: Option<CrossBoundaryBehaviour>, pub cross_boundary_behaviour: Option<CrossBoundaryBehaviour>,
/// Determine what happens when commands are sent while an unmanaged window is in the foreground (default: Op) /// Determine what happens when commands are sent while an unmanaged window is in the foreground
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = OperationBehaviour::Op)))]
pub unmanaged_window_operation_behaviour: Option<OperationBehaviour>, pub unmanaged_window_operation_behaviour: Option<OperationBehaviour>,
/// END OF LIFE FEATURE: Use https://github.com/LGUG2Z/masir instead /// END OF LIFE FEATURE: Use https://github.com/LGUG2Z/masir instead
#[deprecated( #[deprecated(
@@ -472,61 +518,72 @@ pub struct StaticConfig {
)] )]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub focus_follows_mouse: Option<FocusFollowsMouseImplementation>, pub focus_follows_mouse: Option<FocusFollowsMouseImplementation>,
/// Enable or disable mouse follows focus (default: true) /// Enable or disable mouse follows focus
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::MOUSE_FOLLOWS_FOCUS)))]
pub mouse_follows_focus: Option<bool>, pub mouse_follows_focus: Option<bool>,
/// Path to applications.json from komorebi-application-specific-configurations (default: None) /// Path to applications.json from komorebi-application-specific-configurations
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub app_specific_configuration_path: Option<AppSpecificConfigurationPath>, pub app_specific_configuration_path: Option<AppSpecificConfigurationPath>,
/// Width of window borders (default: 8) /// Width of window borders
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[serde(alias = "active_window_border_width")] #[serde(alias = "active_window_border_width")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::BORDER_WIDTH)))]
pub border_width: Option<i32>, pub border_width: Option<i32>,
/// Offset of window borders (default: -1) /// Offset of window borders
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[serde(alias = "active_window_border_offset")] #[serde(alias = "active_window_border_offset")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::BORDER_OFFSET)))]
pub border_offset: Option<i32>, pub border_offset: Option<i32>,
/// Display window borders (default: true) /// Display window borders
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[serde(alias = "active_window_border")] #[serde(alias = "active_window_border")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::BORDER_ENABLED)))]
pub border: Option<bool>, pub border: Option<bool>,
/// Window border colours for different container types (has no effect if a theme is defined) /// Window border colours for different container types (has no effect if a theme is defined)
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[serde(alias = "active_window_border_colours")] #[serde(alias = "active_window_border_colours")]
pub border_colours: Option<BorderColours>, pub border_colours: Option<BorderColours>,
/// Window border style (default: System) /// Window border style
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[serde(alias = "active_window_border_style")] #[serde(alias = "active_window_border_style")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = BorderStyle::System)))]
pub border_style: Option<BorderStyle>, pub border_style: Option<BorderStyle>,
/// DEPRECATED from v0.1.31: no longer required /// DEPRECATED from v0.1.31: no longer required
#[deprecated(note = "No longer required")] #[deprecated(note = "No longer required")]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub border_z_order: Option<ZOrder>, pub border_z_order: Option<ZOrder>,
/// Window border implementation (default: Komorebi) /// Window border implementation
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = BorderImplementation::Komorebi)))]
pub border_implementation: Option<BorderImplementation>, pub border_implementation: Option<BorderImplementation>,
/// Add transparency to unfocused windows (default: false) /// Add transparency to unfocused windows
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::TRANSPARENCY_ENABLED)))]
pub transparency: Option<bool>, pub transparency: Option<bool>,
/// Alpha value for unfocused window transparency [[0-255]] (default: 200) /// Alpha value for unfocused window transparency [[0-255]]
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::TRANSPARENCY_ALPHA)))]
pub transparency_alpha: Option<u8>, pub transparency_alpha: Option<u8>,
/// Individual window transparency ignore rules /// Individual window transparency ignore rules
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub transparency_ignore_rules: Option<Vec<MatchingRule>>, pub transparency_ignore_rules: Option<Vec<MatchingRule>>,
/// Global default workspace padding (default: 10) /// Global default workspace padding
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DEFAULT_WORKSPACE_PADDING)))]
pub default_workspace_padding: Option<i32>, pub default_workspace_padding: Option<i32>,
/// Global default container padding (default: 10) /// Global default container padding
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::DEFAULT_CONTAINER_PADDING)))]
pub default_container_padding: Option<i32>, pub default_container_padding: Option<i32>,
/// Monitor and workspace configurations /// Monitor and workspace configurations
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub monitors: Option<Vec<MonitorConfig>>, pub monitors: Option<Vec<MonitorConfig>>,
/// Which Windows signal to use when hiding windows (default: Cloak) /// Which Windows signal to use when hiding windows
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = HidingBehaviour::Cloak)))]
pub window_hiding_behaviour: Option<HidingBehaviour>, pub window_hiding_behaviour: Option<HidingBehaviour>,
/// Global work area (space used for tiling) offset (default: None) /// Global work area (space used for tiling) offset
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub global_work_area_offset: Option<Rect>, pub global_work_area_offset: Option<Rect>,
/// Individual window floating rules /// Individual window floating rules
@@ -572,8 +629,9 @@ pub struct StaticConfig {
/// Identify applications which are slow to send initial event notifications /// Identify applications which are slow to send initial event notifications
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub slow_application_identifiers: Option<Vec<MatchingRule>>, pub slow_application_identifiers: Option<Vec<MatchingRule>>,
/// How long to wait when compensating for slow applications, in milliseconds (default: 20) /// How long to wait when compensating for slow applications, in milliseconds
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::SLOW_APPLICATION_COMPENSATION_TIME)))]
pub slow_application_compensation_time: Option<u64>, pub slow_application_compensation_time: Option<u64>,
/// Komorebi status bar configuration files for multiple instances on different monitors /// Komorebi status bar configuration files for multiple instances on different monitors
// this option is a little special because it is only consumed by komorebic // this option is a little special because it is only consumed by komorebic
@@ -586,24 +644,26 @@ pub struct StaticConfig {
/// Aspect ratio to resize with when toggling floating mode for a window /// Aspect ratio to resize with when toggling floating mode for a window
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub floating_window_aspect_ratio: Option<AspectRatio>, pub floating_window_aspect_ratio: Option<AspectRatio>,
/// Which Windows API behaviour to use when manipulating windows (default: Sync) /// Which Windows API behaviour to use when manipulating windows
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = WindowHandlingBehaviour::Sync)))]
pub window_handling_behaviour: Option<WindowHandlingBehaviour>, pub window_handling_behaviour: Option<WindowHandlingBehaviour>,
} }
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct AnimationsConfig { pub struct AnimationsConfig {
/// Enable or disable animations (default: false) /// Enable or disable animations
pub enabled: PerAnimationPrefixConfig<bool>, pub enabled: PerAnimationPrefixConfig<bool>,
/// Set the animation duration in ms (default: 250) /// Set the animation duration in ms
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub duration: Option<PerAnimationPrefixConfig<u64>>, pub duration: Option<PerAnimationPrefixConfig<u64>>,
/// Set the animation style (default: Linear) /// Set the animation style
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub style: Option<PerAnimationPrefixConfig<AnimationStyle>>, pub style: Option<PerAnimationPrefixConfig<AnimationStyle>>,
/// Set the animation FPS (default: 60) /// Set the animation FPS
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::ANIMATION_FPS)))]
pub fps: Option<u64>, pub fps: Option<u64>,
} }
@@ -615,105 +675,135 @@ pub enum KomorebiTheme {
Catppuccin { Catppuccin {
/// Name of the Catppuccin theme (theme previews: https://github.com/catppuccin/catppuccin) /// Name of the Catppuccin theme (theme previews: https://github.com/catppuccin/catppuccin)
name: komorebi_themes::Catppuccin, name: komorebi_themes::Catppuccin,
/// Border colour when the container contains a single window (default: Blue) /// Border colour when the container contains a single window
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Blue)))]
single_border: Option<komorebi_themes::CatppuccinValue>, single_border: Option<komorebi_themes::CatppuccinValue>,
/// Border colour when the container contains multiple windows (default: Green) /// Border colour when the container contains multiple windows
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Green)))]
stack_border: Option<komorebi_themes::CatppuccinValue>, stack_border: Option<komorebi_themes::CatppuccinValue>,
/// Border colour when the container is in monocle mode (default: Pink) /// Border colour when the container is in monocle mode
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Pink)))]
monocle_border: Option<komorebi_themes::CatppuccinValue>, monocle_border: Option<komorebi_themes::CatppuccinValue>,
/// Border colour when the window is floating (default: Yellow) /// Border colour when the window is floating
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Yellow)))]
floating_border: Option<komorebi_themes::CatppuccinValue>, floating_border: Option<komorebi_themes::CatppuccinValue>,
/// Border colour when the container is unfocused (default: Base) /// Border colour when the container is unfocused
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Base)))]
unfocused_border: Option<komorebi_themes::CatppuccinValue>, unfocused_border: Option<komorebi_themes::CatppuccinValue>,
/// Border colour when the container is unfocused and locked (default: Red) /// Border colour when the container is unfocused and locked
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Red)))]
unfocused_locked_border: Option<komorebi_themes::CatppuccinValue>, unfocused_locked_border: Option<komorebi_themes::CatppuccinValue>,
/// Stackbar focused tab text colour (default: Green) /// Stackbar focused tab text colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Green)))]
stackbar_focused_text: Option<komorebi_themes::CatppuccinValue>, stackbar_focused_text: Option<komorebi_themes::CatppuccinValue>,
/// Stackbar unfocused tab text colour (default: Text) /// Stackbar unfocused tab text colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Text)))]
stackbar_unfocused_text: Option<komorebi_themes::CatppuccinValue>, stackbar_unfocused_text: Option<komorebi_themes::CatppuccinValue>,
/// Stackbar tab background colour (default: Base) /// Stackbar tab background colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Base)))]
stackbar_background: Option<komorebi_themes::CatppuccinValue>, stackbar_background: Option<komorebi_themes::CatppuccinValue>,
/// Komorebi status bar accent (default: Blue) /// Komorebi status bar accent
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::CatppuccinValue::Blue)))]
bar_accent: Option<komorebi_themes::CatppuccinValue>, bar_accent: Option<komorebi_themes::CatppuccinValue>,
}, },
/// A theme from base16-egui-themes /// A theme from base16-egui-themes
Base16 { Base16 {
/// Name of the Base16 theme (theme previews: https://tinted-theming.github.io/tinted-gallery/) /// Name of the Base16 theme (theme previews: https://tinted-theming.github.io/tinted-gallery/)
name: komorebi_themes::Base16, name: komorebi_themes::Base16,
/// Border colour when the container contains a single window (default: Base0D) /// Border colour when the container contains a single window
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0D)))]
single_border: Option<komorebi_themes::Base16Value>, single_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container contains multiple windows (default: Base0B) /// Border colour when the container contains multiple windows
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0B)))]
stack_border: Option<komorebi_themes::Base16Value>, stack_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is in monocle mode (default: Base0F) /// Border colour when the container is in monocle mode
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0F)))]
monocle_border: Option<komorebi_themes::Base16Value>, monocle_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the window is floating (default: Base09) /// Border colour when the window is floating
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base09)))]
floating_border: Option<komorebi_themes::Base16Value>, floating_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is unfocused (default: Base01) /// Border colour when the container is unfocused
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base01)))]
unfocused_border: Option<komorebi_themes::Base16Value>, unfocused_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is unfocused and locked (default: Base08) /// Border colour when the container is unfocused and locked
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base08)))]
unfocused_locked_border: Option<komorebi_themes::Base16Value>, unfocused_locked_border: Option<komorebi_themes::Base16Value>,
/// Stackbar focused tab text colour (default: Base0B) /// Stackbar focused tab text colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0B)))]
stackbar_focused_text: Option<komorebi_themes::Base16Value>, stackbar_focused_text: Option<komorebi_themes::Base16Value>,
/// Stackbar unfocused tab text colour (default: Base05) /// Stackbar unfocused tab text colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base05)))]
stackbar_unfocused_text: Option<komorebi_themes::Base16Value>, stackbar_unfocused_text: Option<komorebi_themes::Base16Value>,
/// Stackbar tab background colour (default: Base01) /// Stackbar tab background colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base01)))]
stackbar_background: Option<komorebi_themes::Base16Value>, stackbar_background: Option<komorebi_themes::Base16Value>,
/// Komorebi status bar accent (default: Base0D) /// Komorebi status bar accent
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0D)))]
bar_accent: Option<komorebi_themes::Base16Value>, bar_accent: Option<komorebi_themes::Base16Value>,
}, },
/// A custom Base16 theme /// A custom Base16 theme
Custom { Custom {
/// Colours of the custom Base16 theme palette /// Colours of the custom Base16 theme palette
colours: Box<komorebi_themes::Base16ColourPalette>, colours: Box<komorebi_themes::Base16ColourPalette>,
/// Border colour when the container contains a single window (default: Base0D) /// Border colour when the container contains a single window
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0D)))]
single_border: Option<komorebi_themes::Base16Value>, single_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container contains multiple windows (default: Base0B) /// Border colour when the container contains multiple windows
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0B)))]
stack_border: Option<komorebi_themes::Base16Value>, stack_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is in monocle mode (default: Base0F) /// Border colour when the container is in monocle mode
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0F)))]
monocle_border: Option<komorebi_themes::Base16Value>, monocle_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the window is floating (default: Base09) /// Border colour when the window is floating
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base09)))]
floating_border: Option<komorebi_themes::Base16Value>, floating_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is unfocused (default: Base01) /// Border colour when the container is unfocused
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base01)))]
unfocused_border: Option<komorebi_themes::Base16Value>, unfocused_border: Option<komorebi_themes::Base16Value>,
/// Border colour when the container is unfocused and locked (default: Base08) /// Border colour when the container is unfocused and locked
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base08)))]
unfocused_locked_border: Option<komorebi_themes::Base16Value>, unfocused_locked_border: Option<komorebi_themes::Base16Value>,
/// Stackbar focused tab text colour (default: Base0B) /// Stackbar focused tab text colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0B)))]
stackbar_focused_text: Option<komorebi_themes::Base16Value>, stackbar_focused_text: Option<komorebi_themes::Base16Value>,
/// Stackbar unfocused tab text colour (default: Base05) /// Stackbar unfocused tab text colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base05)))]
stackbar_unfocused_text: Option<komorebi_themes::Base16Value>, stackbar_unfocused_text: Option<komorebi_themes::Base16Value>,
/// Stackbar tab background colour (default: Base01) /// Stackbar tab background colour
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base01)))]
stackbar_background: Option<komorebi_themes::Base16Value>, stackbar_background: Option<komorebi_themes::Base16Value>,
/// Komorebi status bar accent (default: Base0D) /// Komorebi status bar accent
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = komorebi_themes::Base16Value::Base0D)))]
bar_accent: Option<komorebi_themes::Base16Value>, bar_accent: Option<komorebi_themes::Base16Value>,
}, },
} }
@@ -835,8 +925,9 @@ pub struct StackbarConfig {
/// Stackbar label /// Stackbar label
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<StackbarLabel>, pub label: Option<StackbarLabel>,
/// Stackbar mode (default: Never) /// Stackbar mode
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schemars", schemars(extend("default" = StackbarMode::Never)))]
pub mode: Option<StackbarMode>, pub mode: Option<StackbarMode>,
/// Stackbar tab configuration options /// Stackbar tab configuration options
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
@@ -1040,9 +1131,18 @@ impl StaticConfig {
DEFAULT_WORKSPACE_PADDING.store(workspace, Ordering::SeqCst); DEFAULT_WORKSPACE_PADDING.store(workspace, Ordering::SeqCst);
} }
border_manager::BORDER_WIDTH.store(self.border_width.unwrap_or(8), Ordering::SeqCst); border_manager::BORDER_WIDTH.store(
border_manager::BORDER_OFFSET.store(self.border_offset.unwrap_or(-1), Ordering::SeqCst); self.border_width.unwrap_or(defaults::BORDER_WIDTH),
border_manager::BORDER_ENABLED.store(self.border.unwrap_or(true), Ordering::SeqCst); Ordering::SeqCst,
);
border_manager::BORDER_OFFSET.store(
self.border_offset.unwrap_or(defaults::BORDER_OFFSET),
Ordering::SeqCst,
);
border_manager::BORDER_ENABLED.store(
self.border.unwrap_or(defaults::BORDER_ENABLED),
Ordering::SeqCst,
);
if let Some(colours) = &self.border_colours { if let Some(colours) = &self.border_colours {
if let Some(single) = colours.single { if let Some(single) = colours.single {
@@ -1096,10 +1196,15 @@ impl StaticConfig {
border_manager::send_notification(None); border_manager::send_notification(None);
} }
transparency_manager::TRANSPARENCY_ENABLED transparency_manager::TRANSPARENCY_ENABLED.store(
.store(self.transparency.unwrap_or(false), Ordering::SeqCst); self.transparency.unwrap_or(defaults::TRANSPARENCY_ENABLED),
transparency_manager::TRANSPARENCY_ALPHA Ordering::SeqCst,
.store(self.transparency_alpha.unwrap_or(200), Ordering::SeqCst); );
transparency_manager::TRANSPARENCY_ALPHA.store(
self.transparency_alpha
.unwrap_or(defaults::TRANSPARENCY_ALPHA),
Ordering::SeqCst,
);
let mut ignore_identifiers = IGNORE_IDENTIFIERS.lock(); let mut ignore_identifiers = IGNORE_IDENTIFIERS.lock();
let mut regex_identifiers = REGEX_IDENTIFIERS.lock(); let mut regex_identifiers = REGEX_IDENTIFIERS.lock();
@@ -1323,10 +1428,12 @@ impl StaticConfig {
unmanaged_window_operation_behaviour: value unmanaged_window_operation_behaviour: value
.unmanaged_window_operation_behaviour .unmanaged_window_operation_behaviour
.unwrap_or(OperationBehaviour::Op), .unwrap_or(OperationBehaviour::Op),
resize_delta: value.resize_delta.unwrap_or(50), resize_delta: value.resize_delta.unwrap_or(defaults::RESIZE_DELTA),
#[allow(deprecated)] #[allow(deprecated)]
focus_follows_mouse: value.focus_follows_mouse, focus_follows_mouse: value.focus_follows_mouse,
mouse_follows_focus: value.mouse_follows_focus.unwrap_or(true), mouse_follows_focus: value
.mouse_follows_focus
.unwrap_or(defaults::MOUSE_FOLLOWS_FOCUS),
hotwatch: Hotwatch::new()?, hotwatch: Hotwatch::new()?,
has_pending_raise_op: false, has_pending_raise_op: false,
pending_move_op: Arc::new(None), pending_move_op: Arc::new(None),
@@ -1416,7 +1523,7 @@ impl StaticConfig {
monitor_config.window_based_work_area_offset; monitor_config.window_based_work_area_offset;
monitor.window_based_work_area_offset_limit = monitor_config monitor.window_based_work_area_offset_limit = monitor_config
.window_based_work_area_offset_limit .window_based_work_area_offset_limit
.unwrap_or(1); .unwrap_or(defaults::WINDOW_BASED_WORK_AREA_OFFSET_LIMIT);
monitor.container_padding = monitor_config.container_padding; monitor.container_padding = monitor_config.container_padding;
monitor.workspace_padding = monitor_config.workspace_padding; monitor.workspace_padding = monitor_config.workspace_padding;
monitor.wallpaper = monitor_config.wallpaper.clone(); monitor.wallpaper = monitor_config.wallpaper.clone();
@@ -1508,7 +1615,7 @@ impl StaticConfig {
m.window_based_work_area_offset = monitor_config.window_based_work_area_offset; m.window_based_work_area_offset = monitor_config.window_based_work_area_offset;
m.window_based_work_area_offset_limit = monitor_config m.window_based_work_area_offset_limit = monitor_config
.window_based_work_area_offset_limit .window_based_work_area_offset_limit
.unwrap_or(1); .unwrap_or(defaults::WINDOW_BASED_WORK_AREA_OFFSET_LIMIT);
m.container_padding = monitor_config.container_padding; m.container_padding = monitor_config.container_padding;
m.workspace_padding = monitor_config.workspace_padding; m.workspace_padding = monitor_config.workspace_padding;
m.floating_layer_behaviour = monitor_config.floating_layer_behaviour; m.floating_layer_behaviour = monitor_config.floating_layer_behaviour;
@@ -1589,7 +1696,7 @@ impl StaticConfig {
monitor_config.window_based_work_area_offset; monitor_config.window_based_work_area_offset;
monitor.window_based_work_area_offset_limit = monitor_config monitor.window_based_work_area_offset_limit = monitor_config
.window_based_work_area_offset_limit .window_based_work_area_offset_limit
.unwrap_or(1); .unwrap_or(defaults::WINDOW_BASED_WORK_AREA_OFFSET_LIMIT);
monitor.container_padding = monitor_config.container_padding; monitor.container_padding = monitor_config.container_padding;
monitor.workspace_padding = monitor_config.workspace_padding; monitor.workspace_padding = monitor_config.workspace_padding;
monitor.wallpaper = monitor_config.wallpaper.clone(); monitor.wallpaper = monitor_config.wallpaper.clone();
@@ -1673,7 +1780,7 @@ impl StaticConfig {
m.window_based_work_area_offset = monitor_config.window_based_work_area_offset; m.window_based_work_area_offset = monitor_config.window_based_work_area_offset;
m.window_based_work_area_offset_limit = monitor_config m.window_based_work_area_offset_limit = monitor_config
.window_based_work_area_offset_limit .window_based_work_area_offset_limit
.unwrap_or(1); .unwrap_or(defaults::WINDOW_BASED_WORK_AREA_OFFSET_LIMIT);
m.container_padding = monitor_config.container_padding; m.container_padding = monitor_config.container_padding;
m.workspace_padding = monitor_config.workspace_padding; m.workspace_padding = monitor_config.workspace_padding;
m.floating_layer_behaviour = monitor_config.floating_layer_behaviour; m.floating_layer_behaviour = monitor_config.floating_layer_behaviour;
@@ -1693,7 +1800,10 @@ impl StaticConfig {
wm.enforce_workspace_rules()?; wm.enforce_workspace_rules()?;
border_manager::BORDER_ENABLED.store(value.border.unwrap_or(true), Ordering::SeqCst); border_manager::BORDER_ENABLED.store(
value.border.unwrap_or(defaults::BORDER_ENABLED),
Ordering::SeqCst,
);
wm.window_management_behaviour.current_behaviour = wm.window_management_behaviour.current_behaviour =
value.window_container_behaviour.unwrap_or_default(); value.window_container_behaviour.unwrap_or_default();
wm.window_management_behaviour.float_override = value.float_override.unwrap_or_default(); wm.window_management_behaviour.float_override = value.float_override.unwrap_or_default();
@@ -1713,8 +1823,10 @@ impl StaticConfig {
wm.unmanaged_window_operation_behaviour = value wm.unmanaged_window_operation_behaviour = value
.unmanaged_window_operation_behaviour .unmanaged_window_operation_behaviour
.unwrap_or_default(); .unwrap_or_default();
wm.resize_delta = value.resize_delta.unwrap_or(50); wm.resize_delta = value.resize_delta.unwrap_or(defaults::RESIZE_DELTA);
wm.mouse_follows_focus = value.mouse_follows_focus.unwrap_or(true); wm.mouse_follows_focus = value
.mouse_follows_focus
.unwrap_or(defaults::MOUSE_FOLLOWS_FOCUS);
wm.work_area_offset = value.global_work_area_offset; wm.work_area_offset = value.global_work_area_offset;
#[allow(deprecated)] #[allow(deprecated)]
{ {
+140 -91
View File
@@ -22,12 +22,13 @@
] ]
}, },
"font_size": { "font_size": {
"description": "Font size (default: 12.5)", "description": "Font size",
"type": [ "type": [
"number", "number",
"null" "null"
], ],
"format": "float" "format": "float",
"default": 12.5
}, },
"frame": { "frame": {
"description": "Frame options (see: https://docs.rs/egui/latest/egui/containers/frame/struct.Frame.html)", "description": "Frame options (see: https://docs.rs/egui/latest/egui/containers/frame/struct.Frame.html)",
@@ -52,20 +53,22 @@
] ]
}, },
"height": { "height": {
"description": "Bar height (default: 50)", "description": "Bar height",
"type": [ "type": [
"number", "number",
"null" "null"
], ],
"format": "float" "format": "float",
"default": 50.0
}, },
"icon_scale": { "icon_scale": {
"description": "Scale of the icons relative to the font_size [[1.0-2.0]]. (default: 1.4)", "description": "Scale of the icons relative to the font_size [[1.0-2.0]]",
"type": [ "type": [
"number", "number",
"null" "null"
], ],
"format": "float" "format": "float",
"default": 1.399999976158142
}, },
"left_widgets": { "left_widgets": {
"description": "Left side widgets (ordered left-to-right)", "description": "Left side widgets (ordered left-to-right)",
@@ -86,12 +89,13 @@
] ]
}, },
"max_label_width": { "max_label_width": {
"description": "Max label width before text truncation (default: 400.0)", "description": "Max label width before text truncation",
"type": [ "type": [
"number", "number",
"null" "null"
], ],
"format": "float" "format": "float",
"default": 400.0
}, },
"monitor": { "monitor": {
"description": "The monitor index or the full monitor options", "description": "The monitor index or the full monitor options",
@@ -149,22 +153,24 @@
] ]
}, },
"transparency_alpha": { "transparency_alpha": {
"description": "Alpha value for the color transparency [[0-255]] (default: 200)", "description": "Alpha value for the color transparency [[0-255]]",
"type": [ "type": [
"integer", "integer",
"null" "null"
], ],
"format": "uint8", "format": "uint8",
"default": 200,
"maximum": 255, "maximum": 255,
"minimum": 0 "minimum": 0
}, },
"widget_spacing": { "widget_spacing": {
"description": "Spacing between widgets (default: 10.0)", "description": "Spacing between widgets",
"type": [ "type": [
"number", "number",
"null" "null"
], ],
"format": "float" "format": "float",
"default": 10.0
} }
}, },
"required": [ "required": [
@@ -762,12 +768,13 @@
"minimum": 0 "minimum": 0
}, },
"data_refresh_interval": { "data_refresh_interval": {
"description": "Data refresh interval (default: 10 seconds)", "description": "Data refresh interval in seconds",
"type": [ "type": [
"integer", "integer",
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"default": 10,
"minimum": 0 "minimum": 0
}, },
"enable": { "enable": {
@@ -896,12 +903,13 @@
"minimum": 0 "minimum": 0
}, },
"data_refresh_interval": { "data_refresh_interval": {
"description": "Data refresh interval (default: 10 seconds)", "description": "Data refresh interval in seconds",
"type": [ "type": [
"integer", "integer",
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"default": 10,
"minimum": 0 "minimum": 0
}, },
"enable": { "enable": {
@@ -1346,12 +1354,13 @@
"type": "object", "type": "object",
"properties": { "properties": {
"data_refresh_interval": { "data_refresh_interval": {
"description": "Data refresh interval (default: 1 second)", "description": "Data refresh interval",
"type": [ "type": [
"integer", "integer",
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"default": 10,
"minimum": 0 "minimum": 0
}, },
"enable": { "enable": {
@@ -1730,18 +1739,20 @@
"type": "object", "type": "object",
"properties": { "properties": {
"focus_monitor_at_cursor": { "focus_monitor_at_cursor": {
"description": "Send the FocusMonitorAtCursor message (default:true)", "description": "Send the FocusMonitorAtCursor message",
"type": [ "type": [
"boolean", "boolean",
"null" "null"
] ],
"default": true
}, },
"ignore_mouse_follows_focus": { "ignore_mouse_follows_focus": {
"description": "Wrap the {message} with a MouseFollowsFocus(false) and MouseFollowsFocus({original.value}) message (default:true)", "description": "Wrap the {message} with a MouseFollowsFocus(false) and MouseFollowsFocus({original.value}) message",
"type": [ "type": [
"boolean", "boolean",
"null" "null"
] ],
"default": true
}, },
"message": { "message": {
"description": "The message to send to the komorebi client", "description": "The message to send to the komorebi client",
@@ -1759,7 +1770,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"bar_accent": { "bar_accent": {
"description": "Komorebi status bar accent (default: Blue)", "description": "Komorebi status bar accent",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1767,10 +1778,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Blue"
}, },
"floating_border": { "floating_border": {
"description": "Border colour when the window is floating (default: Yellow)", "description": "Border colour when the window is floating",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1778,10 +1790,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Yellow"
}, },
"monocle_border": { "monocle_border": {
"description": "Border colour when the container is in monocle mode (default: Pink)", "description": "Border colour when the container is in monocle mode",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1789,7 +1802,8 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Pink"
}, },
"name": { "name": {
"description": "Name of the Catppuccin theme (theme previews: https://github.com/catppuccin/catppuccin)", "description": "Name of the Catppuccin theme (theme previews: https://github.com/catppuccin/catppuccin)",
@@ -1800,7 +1814,7 @@
"const": "Catppuccin" "const": "Catppuccin"
}, },
"single_border": { "single_border": {
"description": "Border colour when the container contains a single window (default: Blue)", "description": "Border colour when the container contains a single window",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1808,10 +1822,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Blue"
}, },
"stack_border": { "stack_border": {
"description": "Border colour when the container contains multiple windows (default: Green)", "description": "Border colour when the container contains multiple windows",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1819,10 +1834,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Green"
}, },
"stackbar_background": { "stackbar_background": {
"description": "Stackbar tab background colour (default: Base)", "description": "Stackbar tab background colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1830,10 +1846,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base"
}, },
"stackbar_focused_text": { "stackbar_focused_text": {
"description": "Stackbar focused tab text colour (default: Green)", "description": "Stackbar focused tab text colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1841,10 +1858,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Green"
}, },
"stackbar_unfocused_text": { "stackbar_unfocused_text": {
"description": "Stackbar unfocused tab text colour (default: Text)", "description": "Stackbar unfocused tab text colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1852,10 +1870,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Text"
}, },
"unfocused_border": { "unfocused_border": {
"description": "Border colour when the container is unfocused (default: Base)", "description": "Border colour when the container is unfocused",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1863,10 +1882,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base"
}, },
"unfocused_locked_border": { "unfocused_locked_border": {
"description": "Border colour when the container is unfocused and locked (default: Red)", "description": "Border colour when the container is unfocused and locked",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/CatppuccinValue" "$ref": "#/$defs/CatppuccinValue"
@@ -1874,7 +1894,8 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Red"
} }
}, },
"required": [ "required": [
@@ -1887,7 +1908,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"bar_accent": { "bar_accent": {
"description": "Komorebi status bar accent (default: Base0D)", "description": "Komorebi status bar accent",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1895,10 +1916,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0D"
}, },
"floating_border": { "floating_border": {
"description": "Border colour when the window is floating (default: Base09)", "description": "Border colour when the window is floating",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1906,10 +1928,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base09"
}, },
"monocle_border": { "monocle_border": {
"description": "Border colour when the container is in monocle mode (default: Base0F)", "description": "Border colour when the container is in monocle mode",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1917,7 +1940,8 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0F"
}, },
"name": { "name": {
"description": "Name of the Base16 theme (theme previews: https://tinted-theming.github.io/tinted-gallery/)", "description": "Name of the Base16 theme (theme previews: https://tinted-theming.github.io/tinted-gallery/)",
@@ -1928,7 +1952,7 @@
"const": "Base16" "const": "Base16"
}, },
"single_border": { "single_border": {
"description": "Border colour when the container contains a single window (default: Base0D)", "description": "Border colour when the container contains a single window",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1936,10 +1960,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0D"
}, },
"stack_border": { "stack_border": {
"description": "Border colour when the container contains multiple windows (default: Base0B)", "description": "Border colour when the container contains multiple windows",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1947,10 +1972,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0B"
}, },
"stackbar_background": { "stackbar_background": {
"description": "Stackbar tab background colour (default: Base01)", "description": "Stackbar tab background colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1958,10 +1984,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base01"
}, },
"stackbar_focused_text": { "stackbar_focused_text": {
"description": "Stackbar focused tab text colour (default: Base0B)", "description": "Stackbar focused tab text colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1969,10 +1996,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0B"
}, },
"stackbar_unfocused_text": { "stackbar_unfocused_text": {
"description": "Stackbar unfocused tab text colour (default: Base05)", "description": "Stackbar unfocused tab text colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1980,10 +2008,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base05"
}, },
"unfocused_border": { "unfocused_border": {
"description": "Border colour when the container is unfocused (default: Base01)", "description": "Border colour when the container is unfocused",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -1991,10 +2020,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base01"
}, },
"unfocused_locked_border": { "unfocused_locked_border": {
"description": "Border colour when the container is unfocused and locked (default: Base08)", "description": "Border colour when the container is unfocused and locked",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2002,7 +2032,8 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base08"
} }
}, },
"required": [ "required": [
@@ -2015,7 +2046,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"bar_accent": { "bar_accent": {
"description": "Komorebi status bar accent (default: Base0D)", "description": "Komorebi status bar accent",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2023,14 +2054,15 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0D"
}, },
"colours": { "colours": {
"description": "Colours of the custom Base16 theme palette", "description": "Colours of the custom Base16 theme palette",
"$ref": "#/$defs/Base16ColourPalette" "$ref": "#/$defs/Base16ColourPalette"
}, },
"floating_border": { "floating_border": {
"description": "Border colour when the window is floating (default: Base09)", "description": "Border colour when the window is floating",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2038,10 +2070,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base09"
}, },
"monocle_border": { "monocle_border": {
"description": "Border colour when the container is in monocle mode (default: Base0F)", "description": "Border colour when the container is in monocle mode",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2049,14 +2082,15 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0F"
}, },
"palette": { "palette": {
"type": "string", "type": "string",
"const": "Custom" "const": "Custom"
}, },
"single_border": { "single_border": {
"description": "Border colour when the container contains a single window (default: Base0D)", "description": "Border colour when the container contains a single window",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2064,10 +2098,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0D"
}, },
"stack_border": { "stack_border": {
"description": "Border colour when the container contains multiple windows (default: Base0B)", "description": "Border colour when the container contains multiple windows",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2075,10 +2110,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0B"
}, },
"stackbar_background": { "stackbar_background": {
"description": "Stackbar tab background colour (default: Base01)", "description": "Stackbar tab background colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2086,10 +2122,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base01"
}, },
"stackbar_focused_text": { "stackbar_focused_text": {
"description": "Stackbar focused tab text colour (default: Base0B)", "description": "Stackbar focused tab text colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2097,10 +2134,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base0B"
}, },
"stackbar_unfocused_text": { "stackbar_unfocused_text": {
"description": "Stackbar unfocused tab text colour (default: Base05)", "description": "Stackbar unfocused tab text colour",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2108,10 +2146,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base05"
}, },
"unfocused_border": { "unfocused_border": {
"description": "Border colour when the container is unfocused (default: Base01)", "description": "Border colour when the container is unfocused",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2119,10 +2158,11 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base01"
}, },
"unfocused_locked_border": { "unfocused_locked_border": {
"description": "Border colour when the container is unfocused and locked (default: Base08)", "description": "Border colour when the container is unfocused and locked",
"anyOf": [ "anyOf": [
{ {
"$ref": "#/$defs/Base16Value" "$ref": "#/$defs/Base16Value"
@@ -2130,7 +2170,8 @@
{ {
"type": "null" "type": "null"
} }
] ],
"default": "Base08"
} }
}, },
"required": [ "required": [
@@ -2248,12 +2289,13 @@
"minimum": 0 "minimum": 0
}, },
"data_refresh_interval": { "data_refresh_interval": {
"description": "Data refresh interval (default: 10 seconds)", "description": "Data refresh interval in seconds",
"type": [ "type": [
"integer", "integer",
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"default": 10,
"minimum": 0 "minimum": 0
}, },
"enable": { "enable": {
@@ -2319,12 +2361,13 @@
"type": "object", "type": "object",
"properties": { "properties": {
"horizontal_scroll_threshold": { "horizontal_scroll_threshold": {
"description": "Defines how many points a user needs to scroll horizontally to make a \"tick\" on a mouse/touchpad/touchscreen (default: 30)", "description": "Defines how many points a user needs to scroll horizontally to make a \"tick\" on a mouse/touchpad/touchscreen",
"type": [ "type": [
"number", "number",
"null" "null"
], ],
"format": "float" "format": "float",
"default": 30.0
}, },
"on_extra1_click": { "on_extra1_click": {
"description": "Command to send on extra1/back button click", "description": "Command to send on extra1/back button click",
@@ -2426,12 +2469,13 @@
] ]
}, },
"vertical_scroll_threshold": { "vertical_scroll_threshold": {
"description": "Defines how many points a user needs to scroll vertically to make a \"tick\" on a mouse/touchpad/touchscreen (default: 30)", "description": "Defines how many points a user needs to scroll vertically to make a \"tick\" on a mouse/touchpad/touchscreen",
"type": [ "type": [
"number", "number",
"null" "null"
], ],
"format": "float" "format": "float",
"default": 30.0
} }
} }
}, },
@@ -2490,12 +2534,13 @@
] ]
}, },
"data_refresh_interval": { "data_refresh_interval": {
"description": "Data refresh interval (default: 10 seconds)", "description": "Data refresh interval in seconds",
"type": [ "type": [
"integer", "integer",
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"default": 10,
"minimum": 0 "minimum": 0
}, },
"enable": { "enable": {
@@ -6309,12 +6354,13 @@
"minimum": 0 "minimum": 0
}, },
"data_refresh_interval": { "data_refresh_interval": {
"description": "Data refresh interval (default: 10 seconds)", "description": "Data refresh interval in seconds",
"type": [ "type": [
"integer", "integer",
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"default": 10,
"minimum": 0 "minimum": 0
}, },
"enable": { "enable": {
@@ -6333,18 +6379,20 @@
] ]
}, },
"show_read_only_disks": { "show_read_only_disks": {
"description": "Show disks that are read only. (default: false)", "description": "Show disks that are read only",
"type": [ "type": [
"boolean", "boolean",
"null" "null"
] ],
"default": false
}, },
"show_removable_disks": { "show_removable_disks": {
"description": "Show removable disks. (default: true)", "description": "Show removable disks",
"type": [ "type": [
"boolean", "boolean",
"null" "null"
] ],
"default": true
} }
}, },
"required": [ "required": [
@@ -6367,7 +6415,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"changing_icon": { "changing_icon": {
"description": "Change the icon depending on the time. The default icon is used between 8:30 and 12:00. (default: false)", "description": "Change the icon depending on the time. The default icon is used between 8:30 and 12:00",
"type": [ "type": [
"boolean", "boolean",
"null" "null"
@@ -6456,12 +6504,13 @@
"type": "object", "type": "object",
"properties": { "properties": {
"data_refresh_interval": { "data_refresh_interval": {
"description": "Data refresh interval (default: 12 hours)", "description": "Data refresh interval in hours",
"type": [ "type": [
"integer", "integer",
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"default": 12,
"minimum": 0 "minimum": 0
}, },
"enable": { "enable": {
+238 -163
View File
File diff suppressed because it is too large Load Diff