aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@codeblau.de>2022-01-30 22:24:52 +0100
committerÖzgür Kesim <oec@codeblau.de>2022-01-30 22:24:52 +0100
commit840f2ff5fd0c89b64411f3b02e971b3e67f1bb9f (patch)
treecb0c072bbdbe2b5074e0c8e57c3e2a6799d60118 /src/utils
parente33174c0bd425e909bc4fd0c19c566bf0587b4b0 (diff)
better layout
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/cpu.rs2
-rw-r--r--src/utils/netspeed.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/cpu.rs b/src/utils/cpu.rs
index cb94f0d..eb4325e 100644
--- a/src/utils/cpu.rs
+++ b/src/utils/cpu.rs
@@ -12,7 +12,7 @@ pub async fn get_cpu_temp() -> ThreadsData {
let value = buf.trim().parse::<f32>().unwrap();
let result = format!(
- " {} {}° {}",
+ " {} {: <3.1}° {}",
CONFIG.cpu_temperature.icon,
value / 1000.0,
CONFIG.seperator
diff --git a/src/utils/netspeed.rs b/src/utils/netspeed.rs
index 4829f30..4181daa 100644
--- a/src/utils/netspeed.rs
+++ b/src/utils/netspeed.rs
@@ -18,7 +18,7 @@ pub async fn get_netspeed() -> ThreadsData {
let rx = calculate(rx_bps);
let data = format!(
- "{}{} {}{} {}",
+ " {}{} {}{} {}",
rx, CONFIG.netspeed.recieve_icon, tx, CONFIG.netspeed.transmit_icon, CONFIG.seperator
);
ThreadsData::NetSpeed(data)
@@ -36,7 +36,7 @@ fn parse_speed_file(pth: &str) -> u64 {
}
fn calculate(speed: u64) -> String {
- let lookup = ["B", "kB", "MB"];
+ let lookup = ["b", "kb", "Mb"];
let mut speed = speed as f64;
let mut idx = 0;
while speed >= 1024.0 && idx < lookup.len() {