Skip to content

Commit 788b1dd

Browse files
committed
supply alternate default colors for MCFLY_LIGHT
1 parent a461c1a commit 788b1dd

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/settings.rs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,26 @@ impl Settings {
261261
)
262262
.get_matches();
263263

264-
let mut settings: Settings = Figment::from(Serialized::defaults(Settings::default()))
264+
let mut default_settings = Settings::default();
265+
266+
if env::var("MCFLY_LIGHT").is_ok() {
267+
default_settings.colors = Colors {
268+
menu_bg: "Blue".to_string(),
269+
menu_fg: "White".to_string(),
270+
menu_deleting_bg: "Red".to_string(),
271+
menu_deleting_fg: "Cyan".to_string(),
272+
bg: "White".to_string(),
273+
fg: "Black".to_string(),
274+
prompt_fg: "Black".to_string(),
275+
highlight: "Blue".to_string(),
276+
timing: "Blue".to_string(),
277+
cursor_bg: "Dark_Grey".to_string(),
278+
cursor_fg: "White".to_string(),
279+
cursor_highlight: "White".to_string(),
280+
};
281+
}
282+
283+
let mut settings: Settings = Figment::from(Serialized::defaults(default_settings))
265284
.merge(Toml::file(Settings::mcfly_config_path()))
266285
.extract()
267286
.unwrap();

0 commit comments

Comments
 (0)