netspeed layout improved
This commit is contained in:
parent
6901ac4b4f
commit
e33174c0bd
@ -19,7 +19,7 @@ pub async fn get_netspeed() -> ThreadsData {
|
|||||||
|
|
||||||
let data = format!(
|
let data = format!(
|
||||||
"{}{} {}{} {}",
|
"{}{} {}{} {}",
|
||||||
CONFIG.netspeed.recieve_icon, rx, CONFIG.netspeed.transmit_icon, tx, CONFIG.seperator
|
rx, CONFIG.netspeed.recieve_icon, tx, CONFIG.netspeed.transmit_icon, CONFIG.seperator
|
||||||
);
|
);
|
||||||
ThreadsData::NetSpeed(data)
|
ThreadsData::NetSpeed(data)
|
||||||
}
|
}
|
||||||
@ -43,5 +43,5 @@ fn calculate(speed: u64) -> String {
|
|||||||
speed /= 1024.0;
|
speed /= 1024.0;
|
||||||
idx += 1;
|
idx += 1;
|
||||||
}
|
}
|
||||||
format!("{:.1} {}", speed, lookup[idx])
|
format!("{: >5.1}{: >2}", speed, lookup[idx])
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user