From 31926e63a3764ceaafbcb35e85254c0c0adde1a6 Mon Sep 17 00:00:00 2001 From: Scott Lawrence Date: Thu, 28 Nov 2024 10:35:38 -0700 Subject: All the options that are not yet used --- src/main.rs | 10 +++++++++- varanus.1 | 11 +++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8647734..053bf09 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,6 +89,12 @@ struct Cli { delay: f64, #[arg(short='s', long, default_value="varanus.sock")] socket: String, + #[arg(short='f', long)] + format: String, + #[arg(long)] + power: bool, + #[arg(long)] + memory: bool, } #[derive(Debug, Serialize, Deserialize, Default)] @@ -294,7 +300,9 @@ fn main() { } } else { match get_state(args.socket.clone()) { - Ok(state) => println!("{:#?}", state), + Ok(state) => { + println!("{:#?}", state) + }, Err(_) => eprintln!("Couldn't open {}", &args.socket) } } diff --git a/varanus.1 b/varanus.1 index c76fd41..15ed995 100644 --- a/varanus.1 +++ b/varanus.1 @@ -9,10 +9,12 @@ varanus \- description . .SY "varanus" .RI [\-s\~ socket ] +.RI [\-f\~ format ] .YS .SH DESCRIPTION .SS Daemon .SS Querying +.SS Format strings . .SH OPTIONS .TP @@ -22,9 +24,18 @@ Start daemon. Without this option, \fBvaranus\fR is started in client mode (prod \fB\-D\fR, \fB\-\-delay\fR (Daemon only) .TP +\fB\-f\fR, \fB\-\-format\fR +Format string for querying the monitor. +.TP \fB\-h\fR, \fB\-\-help\fR Display help: primarily, a summary of all options. .TP +\fB\-\-power\fR +Display only a summary of power +.TP +\fB\-\-memory\fR +Display only a summary of memory +.TP \fB\-s\fR, \fB\-\-socket\fR Socket file .TP -- cgit v1.2.3-54-g00ecf