Update README, Cargo, and main

This commit is contained in:
ClementTsang 2019-09-17 23:47:35 -04:00
parent 794edfc10d
commit dfdd6b14d4
3 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "bottom"
version = "0.1.0-alpha.2"
authors = ["ClementTsang <clementjhtsang@gmail.com>"]
authors = ["Clement Tsang <clementjhtsang@gmail.com>"]
edition = "2018"
repository = "https://github.com/ClementTsang/bottom"
keywords = ["cli", "monitoring-tool", "process", "system", "top"]

View File

@ -5,7 +5,7 @@
A top clone, written in Rust. Inspired by both [gtop](https://github.com/aksakalli/gtop) and [gotop](https://github.com/cjbassi/gotop)
![Quick demo recording](assets/recording_1.gif)
*Note that the background you see is not part of the app, that's just because I use a slightly transparent background*
*Note that the background you see is not part of the app, that's just because I use a slightly transparent terminal.*
## Installation
@ -15,11 +15,11 @@ You can install by cloning and using ``cargo build --release``, or download the
### Windows
This is still in development.
This is still in development, but will be done (hopefully) soon.
### MacOS
Currently, I'm unable to test on MacOS, so I'm not sure how well this will work, if at all. I'll try to source MacOS hardware to test this application.
Currently, I'm unable to really dev or test on MacOS, so I'm not sure how well this will work, if at all. I'll try to source MacOS hardware to test this application.
## Usage
@ -113,3 +113,4 @@ Any suggestions on more accurate data is welcome! Note all other fields should
## Why
I was looking to try writing more things in Rust, and I love the gotop tool. And thus, this project was born.

View File

@ -50,12 +50,12 @@ fn main() -> error::Result<()> {
(@arg FAHRENHEIT : -f --fahrenheit "Sets the temperature type to Fahrenheit.")
(@arg KELVIN : -k --kelvin "Sets the temperature type to Kelvin.")
)
(@arg RATE: -r --rate +takes_value "Sets a refresh rate in milliseconds, min is 250ms, defaults to 1000ms. Higher values may take more resources.")
(@arg RATE_MILLIS: -r --rate +takes_value "Sets a refresh rate in milliseconds; the minimum is 250ms, defaults to 1000ms. Smaller values may take more resources.")
)
//.after_help("Themes:") // TODO: This and others disabled for now
.get_matches();
let update_rate_in_milliseconds : u128 = matches.value_of("RATE").unwrap_or("1000").parse::<u128>()?;
let update_rate_in_milliseconds : u128 = matches.value_of("RATE_MILLIS").unwrap_or("1000").parse::<u128>()?;
if update_rate_in_milliseconds < 250 {
return Err(RustopError::InvalidArg {