Mercurial > core / rust/lib/obj/src/config/user.rs
changeset 698: |
96958d3eb5b0 |
parent: |
c7165d93a9eb
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
3 //! User configuration primitives 4 use crate::object::{direction::RelativeDirection, location::Point}; 5 use serde::{Deserialize, Serialize}; 6 use std::collections::HashMap; 8 use crate::{AuthConfig, DisplayConfig, PackageConfig, ProjectConfig}; 10 /// User configuration type 12 /// Used to configure system users for various platforms. 13 #[derive(Serialize, Deserialize, Debug, Default)] 14 pub struct UserConfig { 15 pub shell: ShellConfig, 16 pub geo: Option<Point>, 17 pub displays: Option<Vec<DisplayConfig>>, 18 pub packages: Vec<PackageConfig>, 19 pub projects: Vec<ProjectConfig>, 20 pub auth: Vec<AuthConfig>, 23 #[derive(Serialize, Deserialize, Debug, Default)] 24 pub struct ShellConfig { 25 pub env: HashMap<String, String>, 26 pub cmds: HashMap<String, String>, 30 #[derive(Serialize, Deserialize, Debug, Hash, Default)] 38 /// A session is a single collection of `pseudo terminals` under the 39 /// management of tmux. Each session has one or more windows linked to 41 #[derive(Serialize, Deserialize, Debug, Default)] 42 pub struct TmuxSessionConfig { 44 pub windows: Vec<TmuxWindowConfig>, 47 /// A window occupies the entire screen and may be split into 48 /// rectangular panes. 49 #[derive(Serialize, Deserialize, Debug, Default)] 50 pub struct TmuxWindowConfig { 52 pub panes: Vec<TmuxPaneConfig>, 55 /// An isolated pseudo terminal (pty) inside a Window, inside a 57 #[derive(Serialize, Deserialize, Debug, Default)] 58 pub struct TmuxPaneConfig { 60 pub position: Option<RelativeDirection>, 61 pub init: Option<String>,