bottom/src/widgets.rs
Clement Tsang 982b7181a6
change: change how disk, temp, and net filters in config are set (#1481)
* change: change how disk, temp, and net filters in config are set

* run rustfmt

* update default config
2024-06-16 02:15:36 -04:00

24 lines
606 B
Rust

pub mod battery_info;
pub mod cpu_graph;
pub mod disk_table;
pub mod mem_graph;
pub mod net_graph;
pub mod process_table;
pub mod temperature_table;
pub use battery_info::*;
pub use cpu_graph::*;
pub use disk_table::*;
pub use mem_graph::*;
pub use net_graph::*;
pub use process_table::*;
pub use temperature_table::*;
use tui::{layout::Rect, Frame};
/// A [`Widget`] converts raw data into something that a user can see and
/// interact with.
pub trait Widget<Data> {
/// How to actually draw the widget to the terminal.
fn draw(&self, f: &mut Frame<'_>, draw_location: Rect, widget_id: u64);
}