Add setting to toggle workspace wrapping
This commit is contained in:
parent
7ec23b0527
commit
4df95190db
2 changed files with 117 additions and 82 deletions
|
|
@ -4,13 +4,30 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
use crate::EdidProduct;
|
||||
|
||||
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct WorkspaceConfig {
|
||||
pub workspace_mode: WorkspaceMode,
|
||||
#[serde(default)]
|
||||
pub workspace_layout: WorkspaceLayout,
|
||||
#[serde(default)]
|
||||
pub action_on_typing: Action,
|
||||
#[serde(default = "default_wraparound")]
|
||||
pub workspace_wraparound: bool,
|
||||
}
|
||||
|
||||
fn default_wraparound() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
impl Default for WorkspaceConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
workspace_mode: WorkspaceMode::default(),
|
||||
workspace_layout: WorkspaceLayout::default(),
|
||||
action_on_typing: Action::default(),
|
||||
workspace_wraparound: default_wraparound(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue