feat(config): add image backend configuration
Swadhin Biswas committed 7 months ago
78feaeb
1 parent 62078a7
commit 78feaeb
1 file changed
+60 -0
Showing 1 changed file+60-0
▼src/config/mod.rs
+60-0
| @@ -218,3 +218,63 @@ fn default_auto() -> String { | ||
218 | 218 | } |
219 | 219 | fn default_normal() -> String { |
220 | 220 | "normal".to_string() |
221 | +} | |
222 | +fn default_center() -> String { | |
223 | + "center".to_string() | |
224 | +} | |
225 | +fn default_gap() -> usize { | |
226 | + 3 | |
227 | +} | |
228 | +fn default_separator() -> String { | |
229 | + ": ".to_string() | |
230 | +} | |
231 | +fn default_block_range() -> (u8, u8) { | |
232 | + (0, 15) | |
233 | +} | |
234 | +fn default_block_width() -> usize { | |
235 | + 3 | |
236 | +} | |
237 | +fn default_block_height() -> usize { | |
238 | + 1 | |
239 | +} | |
240 | +fn default_bar_width() -> usize { | |
241 | + 15 | |
242 | +} | |
243 | +fn default_underline_char() -> String { | |
244 | + "-".to_string() | |
245 | +} | |
246 | + | |
247 | +impl Default for Config { | |
248 | + fn default() -> Self { | |
249 | + Self { | |
250 | + no_color: false, | |
251 | + bold: true, | |
252 | + separator: ": ".to_string(), | |
253 | + colors: ColorConfig::default(), | |
254 | + image_backend: "auto".to_string(), | |
255 | + image_source: "auto".to_string(), | |
256 | + ascii_distro: "auto".to_string(), | |
257 | + ascii_file: None, | |
258 | + ascii_colors: ColorConfig::default(), | |
259 | + ascii_bold: true, | |
260 | + custom_image: None, | |
261 | + image_size: "auto".to_string(), | |
262 | + crop_mode: "normal".to_string(), | |
263 | + crop_offset: "center".to_string(), | |
264 | + emoji_mode: false, | |
265 | + nerd_font: false, | |
266 | + gap: 3, | |
267 | + logo_only: false, | |
268 | + show_title: true, | |
269 | + show_underline: true, | |
270 | + show_os: true, | |
271 | + show_host: true, | |
272 | + show_kernel: true, | |
273 | + show_uptime: true, | |
274 | + show_packages: true, | |
275 | + show_shell: true, | |
276 | + show_resolution: true, | |
277 | + show_de: true, | |
278 | + show_wm: true, | |
279 | + show_wm_theme: true, | |
280 | + show_theme: true, | |
221 | 281 | |