feat: add tiling variables to cosmic config
This commit is contained in:
parent
e43c0f648d
commit
5eb5af4675
5 changed files with 189 additions and 44 deletions
|
|
@ -7,13 +7,44 @@ use std::collections::HashMap;
|
|||
pub mod input;
|
||||
pub mod workspace;
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, CosmicConfigEntry)]
|
||||
#[derive(Clone, Debug, PartialEq, CosmicConfigEntry)]
|
||||
#[version = 1]
|
||||
pub struct CosmicCompConfig {
|
||||
pub workspaces: workspace::WorkspaceConfig,
|
||||
pub input_default: input::InputConfig,
|
||||
pub input_touchpad: input::InputConfig,
|
||||
pub input_devices: HashMap<String, input::InputConfig>,
|
||||
pub xkb_config: XkbConfig,
|
||||
/// Autotiling enabled
|
||||
pub autotile: bool,
|
||||
/// Determines the behavior of the autotile variable
|
||||
/// If set to Global, autotile applies to all windows in all workspaces
|
||||
/// If set to PerWorkspace, autotile only applies to new windows, and new workspaces
|
||||
pub autotile_behavior: TileBehavior,
|
||||
/// Active hint enabled
|
||||
pub active_hint: bool,
|
||||
}
|
||||
|
||||
impl Default for CosmicCompConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
workspaces: Default::default(),
|
||||
input_default: Default::default(),
|
||||
input_touchpad: Default::default(),
|
||||
input_devices: Default::default(),
|
||||
xkb_config: Default::default(),
|
||||
autotile: Default::default(),
|
||||
autotile_behavior: Default::default(),
|
||||
active_hint: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Copy, Clone, PartialEq, Deserialize, Serialize)]
|
||||
pub enum TileBehavior {
|
||||
#[default]
|
||||
Global,
|
||||
PerWorkspace,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue