index : nmrs-tui
A fast, Vim-friendly NetworkManager TUI built in Rust.
about summary refs log tree commit diff
nmrs-tui / config.ron
-rw-r--r-- blob 47424b54704710b90e19f5e133cea97eec56734d 7194 bytes (plain)
1
/* @[crate::config::Config] */
2
3
Config(
4
    ui: Ui(
5
        layout: (
6
            direction: Vertical,
7
            panels: [
8
                (
9
                    kind: Header,
10
                    constraint: Length(1),
11
                ),
12
                (
13
                    kind: KnownNetworks,
14
                    constraint: Percentage(50),
15
                ),
16
                (
17
                    kind: AvailableNetworks,
18
                    constraint: Percentage(50),
19
                ),
20
                (
21
                    kind: Devices,
22
                    constraint: Min(5),
23
                ),
24
                (
25
                    kind: Help,
26
                    constraint: Length(1),
27
                ),
28
            ],
29
        ),
30
        known_networks: TableConfig(
31
            title: " Known Networks ",
32
            header: Header(
33
                columns: [
34
                    (
35
                        title: "Name",
36
                        value: Name,
37
                        constraint: Percentage(40),
38
                    ),
39
                    (
40
                        title: "Security",
41
                        value: Security,
42
                        constraint: Percentage(20),
43
                    ),
44
                    (
45
                        title: "State",
46
                        value: State,
47
                        constraint: Percentage(20),
48
                    ),
49
                    (
50
                        title: "Signal",
51
                        value: Signal,
52
                        constraint: Percentage(20),
53
                    ),
54
                ],
55
                style_active: StyleConfig(
56
                    fg: Some("yellow"),
57
                    bold: true,
58
                ),
59
            ),
60
            border: Border(
61
                style_active: StyleConfig(
62
                    fg: Some("green"),
63
                    bold: true,
64
                ),
65
                type_active: Thick,
66
            ),
67
            margin: Margin(
68
                left: 1,
69
                right: 1,
70
            ),
71
        ),
72
        available_networks: TableConfig(
73
            title: " Available Networks ",
74
            header: Header(
75
                columns: [
76
                    (
77
                        title: "Name",
78
                        value: Name,
79
                        constraint: Percentage(40),
80
                    ),
81
                    (
82
                        title: "Security",
83
                        value: Security,
84
                        constraint: Percentage(20),
85
                    ),
86
                    (
87
                        title: "Signal",
88
                        value: Signal,
89
                        constraint: Percentage(20),
90
                    ),
91
                ],
92
                style_active: StyleConfig(
93
                    fg: Some("yellow"),
94
                    bold: true,
95
                ),
96
            ),
97
            border: Border(
98
                style_active: StyleConfig(
99
                    fg: Some("green"),
100
                    bold: true,
101
                ),
102
                type_active: Thick,
103
            ),
104
            margin: Margin(
105
                left: 1,
106
                right: 1,
107
            ),
108
        ),
109
        devices: TableConfig(
110
            title: " Devices ",
111
            header: Header(
112
                columns: [
113
                    (
114
                        title: "Name",
115
                        value: Name,
116
                        constraint: Percentage(10),
117
                    ),
118
                    (
119
                        title: "Powered",
120
                        value: Powered,
121
                        constraint: Percentage(10),
122
                    ),
123
                    (
124
                        title: "State",
125
                        value: State,
126
                        constraint: Percentage(15),
127
                    ),
128
                    (
129
                        title: "Frequency",
130
                        value: Frequency,
131
                        constraint: Percentage(15),
132
                    ),
133
                    (
134
                        title: "Address",
135
                        value: Address,
136
                        constraint: Percentage(20),
137
                    ),
138
                    (
139
                        title: "Security",
140
                        value: Security,
141
                        constraint: Percentage(20),
142
                    ),
143
                ],
144
                style_active: StyleConfig(
145
                    fg: Some("yellow"),
146
                    bold: true,
147
                ),
148
            ),
149
            border: Border(
150
                style_active: StyleConfig(
151
                    fg: Some("green"),
152
                    bold: true,
153
                ),
154
                type_active: Thick,
155
            ),
156
            margin: Margin(
157
                left: 1,
158
                right: 1,
159
            ),
160
        ),
161
        password_popup: PopupConfig(
162
            width: 60,
163
            height: 7,
164
        ),
165
        toast: ToastConfig(
166
            normal: UrgencyConfig(
167
                default_title: "Normal",
168
                title_style: StyleConfig(
169
                    fg: Some("gray"),
170
                    bold: true,
171
                ),
172
                border: Border(
173
                    style_normal: StyleConfig(
174
                        fg: Some("gray"),
175
                        bold: true,
176
                    ),
177
                    type_active: Thick,
178
                ),
179
                default_duration_secs: 3.0,
180
            ),
181
            success: UrgencyConfig(
182
                default_title: "Success",
183
                title_style: StyleConfig(
184
                    fg: Some("green"),
185
                    bold: true,
186
                ),
187
                border: Border(
188
                    style_normal: StyleConfig(
189
                        fg: Some("green"),
190
                        bold: true,
191
                    ),
192
                    type_active: Thick,
193
                ),
194
                default_duration_secs: 3.0,
195
            ),
196
            warning: UrgencyConfig(
197
                default_title: "Warning",
198
                title_style: StyleConfig(
199
                    fg: Some("yellow"),
200
                    bold: true,
201
                ),
202
                border: Border(
203
                    style_normal: StyleConfig(
204
                        fg: Some("yellow"),
205
                        bold: true,
206
                    ),
207
                    type_active: Thick,
208
                ),
209
                default_duration_secs: 6.0,
210
            ),
211
            critical: UrgencyConfig(
212
                default_title: "Critical",
213
                title_style: StyleConfig(
214
                    fg: Some("red"),
215
                    bold: true,
216
                ),
217
                border: Border(
218
                    style_normal: StyleConfig(
219
                        fg: Some("red"),
220
                        bold: true,
221
                    ),
222
                    type_active: Thick,
223
                ),
224
                default_duration_secs: 10.0,
225
            ),
226
            position: RightTop,
227
            margin: Margin(
228
                top: 1,
229
                right: 1,
230
            ),
231
        ),
232
    ),
233
)