mirror of
https://github.com/danog/ytop.git
synced 2024-11-26 20:15:03 +01:00
refactor: reorder args.rs
This commit is contained in:
parent
d3cd9a5e2e
commit
1c23334444
38
src/args.rs
38
src/args.rs
@ -28,6 +28,14 @@ impl FromStr for Colorscheme {
|
||||
|
||||
#[derive(StructOpt)]
|
||||
pub struct Args {
|
||||
/// Show average CPU in the CPU widget.
|
||||
#[structopt(short = "a", long = "average-cpu")]
|
||||
pub average_cpu: bool,
|
||||
|
||||
/// Show Battery widget (overridden by 'minimal' flag).
|
||||
#[structopt(short = "b", long = "battery")]
|
||||
pub battery: bool,
|
||||
|
||||
/// Set a colorscheme.
|
||||
#[structopt(
|
||||
short = "c",
|
||||
@ -43,35 +51,27 @@ pub struct Args {
|
||||
)]
|
||||
pub colorscheme: Colorscheme,
|
||||
|
||||
/// Show temperatures in fahrenheit.
|
||||
#[structopt(short = "f", long = "fahrenheit")]
|
||||
pub fahrenheit: bool,
|
||||
|
||||
/// Comma separated list of network interfaces to show. Prepend an interface with '!' to hide it. 'all' shows all interfaces.
|
||||
#[structopt(short = "i", long = "interfaces", default_value = "!tun0")]
|
||||
pub interfaces: String,
|
||||
|
||||
/// Only show the CPU, Mem, and Process widgets.
|
||||
#[structopt(short = "m", long = "minimal")]
|
||||
pub minimal: bool,
|
||||
|
||||
/// Number of times per second to update the CPU and Mem widgets.
|
||||
#[structopt(short = "r", long = "rate", default_value = "1")]
|
||||
pub rate: f64,
|
||||
|
||||
/// Show each CPU in the CPU widget.
|
||||
#[structopt(short = "p", long = "per-cpu")]
|
||||
pub per_cpu: bool,
|
||||
|
||||
/// Show average CPU in the CPU widget.
|
||||
#[structopt(short = "a", long = "average-cpu")]
|
||||
pub average_cpu: bool,
|
||||
|
||||
/// Show temperatures in fahrenheit.
|
||||
#[structopt(short = "f", long = "fahrenheit")]
|
||||
pub fahrenheit: bool,
|
||||
/// Number of times per second to update the CPU and Mem widgets.
|
||||
#[structopt(short = "r", long = "rate", default_value = "1")]
|
||||
pub rate: f64,
|
||||
|
||||
/// Show a statusbar with the time.
|
||||
#[structopt(short = "s", long = "statusbar")]
|
||||
pub statusbar: bool,
|
||||
|
||||
/// Show Battery widget (overridden by 'minimal' flag).
|
||||
#[structopt(short = "b", long = "battery")]
|
||||
pub battery: bool,
|
||||
|
||||
/// Comma separated list of network interfaces to show. Prepend an interface with '!' to hide it. 'all' shows all interfaces.
|
||||
#[structopt(short = "i", long = "interfaces", default_value = "!tun0")]
|
||||
pub interfaces: String,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user