forked from wathiede/i3xs
Read all CPUs in one widget.
This commit is contained in:
@@ -2,8 +2,6 @@ use chrono::NaiveTime;
|
||||
|
||||
use i3monkit::{ColorRGB, Header, I3Protocol, WidgetCollection};
|
||||
|
||||
use num_cpus;
|
||||
|
||||
use structopt::StructOpt;
|
||||
|
||||
use i3xs::widgets::cpu::CpuWidget;
|
||||
@@ -22,10 +20,7 @@ fn main() {
|
||||
|
||||
let opts = Opt::from_args();
|
||||
|
||||
// Display all the cpu usage for each core
|
||||
for i in 0..num_cpus::get() as u32 {
|
||||
bar.push(CpuWidget::new(i));
|
||||
}
|
||||
bar.push(CpuWidget::new());
|
||||
|
||||
// Realtime upload/download rate for a interface
|
||||
bar.push(NetworkSpeedWidget::new(&opts.nic, 6));
|
||||
|
||||
@@ -2,8 +2,6 @@ use chrono::NaiveTime;
|
||||
|
||||
use i3monkit::{ColorRGB, Header, I3Protocol, WidgetCollection};
|
||||
|
||||
use num_cpus;
|
||||
|
||||
use structopt::StructOpt;
|
||||
|
||||
use i3xs::widgets::cpu::CpuWidget;
|
||||
@@ -22,10 +20,7 @@ fn main() {
|
||||
|
||||
let opts = Opt::from_args();
|
||||
|
||||
// Display all the cpu usage for each core
|
||||
for i in 0..num_cpus::get() as u32 {
|
||||
bar.push(CpuWidget::new(i));
|
||||
}
|
||||
bar.push(CpuWidget::new());
|
||||
|
||||
// Realtime upload/download rate for a interface
|
||||
bar.push(NetworkSpeedWidget::new(&opts.nic, 6));
|
||||
|
||||
Reference in New Issue
Block a user