You've already forked neo64fetch
mirror of
https://github.com/neoarz/neo64fetch.git
synced 2026-02-19 11:43:25 +01:00
feat: colors
This commit is contained in:
@@ -75,7 +75,7 @@ pub fn get_battery_info() -> String {
|
||||
status.push_str("Discharging");
|
||||
}
|
||||
|
||||
let mut result = format!("({}) {}%", device_name, percentage);
|
||||
let mut result = format!("({}) {}", device_name, crate::output::colors::battery_percent(percentage));
|
||||
|
||||
if !external_connected && !is_charging {
|
||||
if let Some(time_mins) = avg_time_to_empty {
|
||||
|
||||
@@ -23,7 +23,7 @@ pub fn get_display_info() -> String {
|
||||
};
|
||||
|
||||
format!(
|
||||
"Display ({}): {}x{} @ {}x in {}\", {} Hz {}",
|
||||
"({}): {}x{} @ {}x in {}\", {} Hz {}",
|
||||
name, p_width, p_height, main.scale_factor as u32, inches, main.frequency as u32, tag
|
||||
)
|
||||
} else {
|
||||
|
||||
@@ -73,7 +73,7 @@ pub fn get_memory_info() -> String {
|
||||
};
|
||||
|
||||
format!(
|
||||
"{:.2} GiB / {:.2} GiB ({:.0}%)",
|
||||
used_gib, total_gib, percentage
|
||||
"{:.2} GiB / {:.2} GiB ({})",
|
||||
used_gib, total_gib, crate::output::colors::percent(percentage)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -78,8 +78,8 @@ pub fn get_storage_info() -> String {
|
||||
let read_only = (fs.f_flags & MNT_RDONLY) != 0;
|
||||
|
||||
let mut result = format!(
|
||||
"{:.2} GiB / {:.2} GiB ({:.0}%)",
|
||||
used_gib, total_gib, percentage
|
||||
"{:.2} GiB / {:.2} GiB ({})",
|
||||
used_gib, total_gib, crate::output::colors::percent(percentage)
|
||||
);
|
||||
|
||||
if !filesystem.is_empty() {
|
||||
|
||||
@@ -32,8 +32,8 @@ pub fn get_swap_info() -> String {
|
||||
};
|
||||
|
||||
return format!(
|
||||
"{:.2} GiB / {:.2} GiB ({:.0}%)",
|
||||
used_gib, total_gib, percentage
|
||||
"{:.2} GiB / {:.2} GiB ({})",
|
||||
used_gib, total_gib, crate::output::colors::percent(percentage)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user