diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 30a9b25..1e35289 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,7 +28,6 @@ use ::std::io; use ::std::time::Instant; use ::termion::raw::IntoRawMode; use ::tui::backend::TermionBackend; - use structopt::StructOpt; const DISPLAY_DELTA: time::Duration = time::Duration::from_millis(1000); @@ -45,6 +44,15 @@ pub struct Opt { #[structopt(short, long)] /// Do not attempt to resolve IPs to their hostnames no_resolve: bool, + #[structopt(flatten)] + render_opts: RenderOpts, +} + +#[derive(StructOpt, Debug)] +pub struct RenderOpts { + processes: bool, + connections: bool, + addresses: bool, } fn main() { @@ -114,7 +122,7 @@ where let raw_mode = opts.raw; let network_utilization = Arc::new(Mutex::new(Utilization::new())); - let ui = Arc::new(Mutex::new(Ui::new(terminal_backend))); + let ui = Arc::new(Mutex::new(Ui::new(terminal_backend, opts.render_opts))); if !raw_mode { active_threads.push( |