diff options
author | ClementTsang <clementjhtsang@gmail.com> | 2020-01-02 23:42:44 -0500 |
---|---|---|
committer | ClementTsang <clementjhtsang@gmail.com> | 2020-01-02 23:42:44 -0500 |
commit | 8cc8b47c89ff9397ea8d365cdc9d5ffd995458ac (patch) | |
tree | 7cc15f77fe53c8823be1efa5d112594efe0f28dd | |
parent | 7b902a9470457655852307bc5369a64fcd3e5871 (diff) |
Some documentation changes
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | assets/recording_1.gif | bin | 2267197 -> 2129377 bytes | |||
-rw-r--r-- | src/app/process_killer.rs | 9 | ||||
-rw-r--r-- | src/main.rs | 2 |
5 files changed, 9 insertions, 12 deletions
@@ -4,10 +4,10 @@ version = "0.1.0" authors = ["Clement Tsang <clementjhtsang@gmail.com>"] edition = "2018" repository = "https://github.com/ClementTsang/bottom" -keywords = ["cli", "monitoring-tool", "process", "system", "top", "temperature", "cpu", "memory", "bottom", "graphical"] +keywords = ["cli", "monitoring-tool", "process", "system", "top", "temperature", "cpu", "memory", "network", "bottom", "graphical"] license = "MIT" categories = ["command-line-utilities"] -description = "A graphical top clone." +description = "A graphical top clone, written in Rust. Inspired by both gtop and gotop." readme = "README.md" [[bin]] @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.com/ClementTsang/bottom.svg?token=1wvzVgp94E1TZyPNs8JF&branch=master)](https://travis-ci.com/ClementTsang/bottom) [![crates.io link](https://img.shields.io/crates/v/bottom.svg)](https://crates.io/crates/bottom) -A top clone, written in Rust. Inspired by both [gtop](https://github.com/aksakalli/gtop) and [gotop](https://github.com/cjbassi/gotop) +A graphical 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) @@ -54,7 +54,7 @@ The compatibility of each widget and operating systems are, as of version 0.1.0, - `-l`, `--left_legend` will move external table legends to the left side rather than the right side. Right side is default. -- `-u`, `--current_usage` will make a process' CPU usage be based on the current total CPU usage, rather than assuming 100% CPU usage. Only affects Linux. +- `-u`, `--current_usage` will make a process' CPU usage be based on the current total CPU usage, rather than assuming 100% CPU usage. Only affects Linux for now. ### Keybindings @@ -96,7 +96,7 @@ The compatibility of each widget and operating systems are, as of version 0.1.0, ## Thanks, kudos, and all the like -- As mentioned, this project is very much inspired by both [gotop](https://github.com/cjbassi/gotop) and [gtop](https://github.com/aksakalli/gtop) . +- This project is very much inspired by both [gotop](https://github.com/cjbassi/gotop) and [gtop](https://github.com/aksakalli/gtop) . - This application was written with the following libraries: - [chrono](https://github.com/chronotope/chrono) diff --git a/assets/recording_1.gif b/assets/recording_1.gif Binary files differindex bb24987e..d962d16d 100644 --- a/assets/recording_1.gif +++ b/assets/recording_1.gif diff --git a/src/app/process_killer.rs b/src/app/process_killer.rs index 840d2eea..1c4e5117 100644 --- a/src/app/process_killer.rs +++ b/src/app/process_killer.rs @@ -34,16 +34,15 @@ impl Process { /// Kills a process, given a PID. pub fn kill_process_given_pid(pid: u32) -> crate::utils::error::Result<()> { if cfg!(target_os = "linux") { - // Linux Command::new("kill").arg(pid.to_string()).output()?; } else if cfg!(target_os = "windows") { #[cfg(target_os = "windows")] - let process = Process::open(pid as DWORD)?; - #[cfg(target_os = "windows")] - process.kill()?; + { + let process = Process::open(pid as DWORD)?; + process.kill()?; + } } else if cfg!(target_os = "macos") { // TODO: macOS - // See how sysinfo does it... https://docs.rs/sysinfo/0.9.5/sysinfo/trait.ProcessExt.html return Err(BottomError::GenericError { message: "Sorry, macOS support is not implemented yet!".to_string(), }); diff --git a/src/main.rs b/src/main.rs index 644d1e96..7bf62b0e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,8 +37,6 @@ use constants::TICK_RATE_IN_MILLISECONDS; use data_conversion::*; use utils::error::{self, BottomError}; -// End imports - enum Event<I, J> { KeyInput(I), MouseInput(J), |