shell/tiling: Make gaps configurable

This commit is contained in:
Victoria Brekenfeld 2023-03-09 18:27:29 +01:00
parent 4bf2c8df79
commit b53e5cae6e
4 changed files with 53 additions and 17 deletions

View file

@ -39,6 +39,8 @@ pub struct StaticConfig {
pub tiling_enabled: bool,
#[serde(default = "default_active_hint")]
pub active_hint: u8,
#[serde(default = "default_gaps")]
pub gaps: (u8, u8),
}
#[derive(Debug, Deserialize, Clone, Copy, PartialEq, Eq)]
@ -83,6 +85,10 @@ fn default_active_hint() -> u8 {
4
}
fn default_gaps() -> (u8, u8) {
(0, 4)
}
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
pub struct OutputConfig {
pub mode: ((i32, i32), Option<u32>),
@ -228,6 +234,7 @@ impl Config {
workspace_amount: WorkspaceAmount::Dynamic,
tiling_enabled: false,
active_hint: default_active_hint(),
gaps: default_gaps(),
}
}