Skip to content

Commit

Permalink
Change the default config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlurak committed Aug 7, 2024
1 parent d867f82 commit 80d3077
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::utils::system::battery::BatteryInformation;
pub fn get_modules() -> Vec<StyledModule> {
let battery_information = BatteryInformation::new();
let battery_percentage = battery_information.map(|x| x.percentages);
let is_charging = battery_information.map(|x| x.is_charging).unwrap_or(true);

let battery_icon = Icon::new_battery(&battery_information);

Expand Down Expand Up @@ -66,7 +67,7 @@ pub fn get_modules() -> Vec<StyledModule> {
bold: true,
},
),
battery_percentage.unwrap_or(100) < 20,
battery_percentage.unwrap_or(100) < 20 && !is_charging,
),
]
.into_iter()
Expand Down

0 comments on commit 80d3077

Please sign in to comment.