tauri_plugin_config_manager/
models.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Serialize, Deserialize)]
4pub struct VSKConfig {
5 pub style: Style,
6 pub desktop: Option<Desktop>,
7 #[serde(default)]
8 pub fonts: Fonts,
9 #[serde(default)]
10 pub icons: Icons,
11}
12
13#[derive(Debug, Serialize, Deserialize, Default)]
14pub struct Fonts {
15 pub terminal: String,
16 pub title: String,
17 pub apps: String,
18}
19
20#[derive(Debug, Serialize, Deserialize, Default)]
21pub struct Icons {
22 pub dark: String,
23 #[serde(default, alias = "light")]
24 pub light: String,
25}
26
27#[derive(Debug, Serialize, Deserialize)]
28pub struct Desktop {
29 pub wallpaper: Vec<String>,
30 pub iconsize: u32,
31 pub showfiles: bool,
32 pub showhiddenfiles: bool,
33}
34
35#[derive(Debug, Serialize, Deserialize)]
36pub struct Style {
37 pub darkmode: bool,
38 #[serde(rename = "color-scheme")]
39 pub color_scheme: String,
40 pub radius: u32,
41}
42
43#[derive(Debug, Serialize, Deserialize, Clone)]
44pub struct Scheme {
45 pub path: String,
46 pub scheme: SchemeData,
47}
48
49#[derive(Debug, Serialize, Deserialize, Clone)]
50pub struct SchemeData {
51 pub id: String,
52 pub name: String,
53 pub author: String,
54 pub description: String,
55 pub version: String,
56 pub colors: SchemeColors,
57}
58
59#[derive(Debug, Serialize, Deserialize, Clone)]
60pub struct SchemeColors {
61 pub dark: ThemeVariant,
62 pub light: ThemeVariant,
63}
64
65#[derive(Debug, Serialize, Deserialize, Clone)]
66pub struct ThemeVariant {
67 pub ui: UiColors,
68 pub terminal: TerminalColors,
69}
70
71#[derive(Debug, Serialize, Deserialize, Clone)]
72pub struct UiColors {
73 pub color: ColorPalette,
74 pub text: TextColors,
75 pub background: String,
76 pub border: String,
77 pub surface: String,
78}
79
80#[derive(Debug, Serialize, Deserialize, Clone)]
81pub struct ColorPalette {
82 pub primary: String,
83 pub secondary: String,
84}
85
86#[derive(Debug, Serialize, Deserialize, Clone)]
87pub struct TextColors {
88 pub main: String,
89 pub muted: String,
90 #[serde(rename = "on-primary")]
91 pub on_primary: String,
92}
93
94#[derive(Debug, Serialize, Deserialize, Clone)]
95pub struct TerminalColors {
96 pub foreground: String,
97 pub background: String,
98 pub cursor: String,
99 pub ansi: AnsiColors,
100}
101
102#[derive(Debug, Serialize, Deserialize, Clone)]
103pub struct AnsiColors {
104 pub black: String,
105 pub red: String,
106 pub green: String,
107 pub yellow: String,
108 pub blue: String,
109 pub magenta: String,
110 pub cyan: String,
111 pub white: String,
112 #[serde(rename = "brightBlack")]
113 pub bright_black: String,
114 #[serde(rename = "brightRed")]
115 pub bright_red: String,
116 #[serde(rename = "brightGreen")]
117 pub bright_green: String,
118 #[serde(rename = "brightYellow")]
119 pub bright_yellow: String,
120 #[serde(rename = "brightBlue")]
121 pub bright_blue: String,
122 #[serde(rename = "brightMagenta")]
123 pub bright_magenta: String,
124 #[serde(rename = "brightCyan")]
125 pub bright_cyan: String,
126 #[serde(rename = "brightWhite")]
127 pub bright_white: String,
128}