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