diff --git a/Cargo.toml b/Cargo.toml index a3670a4d..2b5600d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" authors = ["Clement Tsang "] 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]] diff --git a/README.md b/README.md index c70cb2c1..4ab4341f 100644 --- a/README.md +++ b/README.md @@ -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 index bb24987e..d962d16d 100644 Binary files a/assets/recording_1.gif and b/assets/recording_1.gif differ 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 { KeyInput(I), MouseInput(J),