50 lines
1.2 KiB
Rust
50 lines
1.2 KiB
Rust
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::EdidProduct;
|
|
|
|
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
pub struct WorkspaceConfig {
|
|
pub workspace_mode: WorkspaceMode,
|
|
#[serde(default)]
|
|
pub workspace_layout: WorkspaceLayout,
|
|
#[serde(default)]
|
|
pub action_on_typing: Action,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub enum WorkspaceMode {
|
|
#[default]
|
|
OutputBound,
|
|
Global,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub enum WorkspaceLayout {
|
|
#[default]
|
|
Vertical,
|
|
Horizontal,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub enum Action {
|
|
#[default]
|
|
None,
|
|
OpenLauncher,
|
|
OpenApplications,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct OutputMatch {
|
|
pub name: String,
|
|
pub edid: Option<EdidProduct>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub struct PinnedWorkspace {
|
|
pub output: OutputMatch,
|
|
pub tiling_enabled: bool,
|
|
pub id: Option<String>,
|
|
// TODO: name
|
|
}
|