Skip to content

Commit

Permalink
supply alternate default colors for MCFLY_LIGHT
Browse files Browse the repository at this point in the history
  • Loading branch information
dmfay committed Jun 6, 2021
1 parent a461c1a commit 788b1dd
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,26 @@ impl Settings {
)
.get_matches();

let mut settings: Settings = Figment::from(Serialized::defaults(Settings::default()))
let mut default_settings = Settings::default();

if env::var("MCFLY_LIGHT").is_ok() {
default_settings.colors = Colors {
menu_bg: "Blue".to_string(),
menu_fg: "White".to_string(),
menu_deleting_bg: "Red".to_string(),
menu_deleting_fg: "Cyan".to_string(),
bg: "White".to_string(),
fg: "Black".to_string(),
prompt_fg: "Black".to_string(),
highlight: "Blue".to_string(),
timing: "Blue".to_string(),
cursor_bg: "Dark_Grey".to_string(),
cursor_fg: "White".to_string(),
cursor_highlight: "White".to_string(),
};
}

let mut settings: Settings = Figment::from(Serialized::defaults(default_settings))
.merge(Toml::file(Settings::mcfly_config_path()))
.extract()
.unwrap();
Expand Down

0 comments on commit 788b1dd

Please sign in to comment.