Some documentation changes
This commit is contained in:
parent
7b902a9470
commit
8cc8b47c89
|
@ -4,10 +4,10 @@ version = "0.1.0"
|
||||||
authors = ["Clement Tsang <clementjhtsang@gmail.com>"]
|
authors = ["Clement Tsang <clementjhtsang@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
repository = "https://github.com/ClementTsang/bottom"
|
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"
|
license = "MIT"
|
||||||
categories = ["command-line-utilities"]
|
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"
|
readme = "README.md"
|
||||||
|
|
||||||
[[bin]]
|
[[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)
|
[![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)
|
![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.
|
- `-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
|
### 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
|
## 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:
|
- This application was written with the following libraries:
|
||||||
- [chrono](https://github.com/chronotope/chrono)
|
- [chrono](https://github.com/chronotope/chrono)
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.0 MiB |
|
@ -34,16 +34,15 @@ impl Process {
|
||||||
/// Kills a process, given a PID.
|
/// Kills a process, given a PID.
|
||||||
pub fn kill_process_given_pid(pid: u32) -> crate::utils::error::Result<()> {
|
pub fn kill_process_given_pid(pid: u32) -> crate::utils::error::Result<()> {
|
||||||
if cfg!(target_os = "linux") {
|
if cfg!(target_os = "linux") {
|
||||||
// Linux
|
|
||||||
Command::new("kill").arg(pid.to_string()).output()?;
|
Command::new("kill").arg(pid.to_string()).output()?;
|
||||||
} else if cfg!(target_os = "windows") {
|
} else if cfg!(target_os = "windows") {
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
let process = Process::open(pid as DWORD)?;
|
{
|
||||||
#[cfg(target_os = "windows")]
|
let process = Process::open(pid as DWORD)?;
|
||||||
process.kill()?;
|
process.kill()?;
|
||||||
|
}
|
||||||
} else if cfg!(target_os = "macos") {
|
} else if cfg!(target_os = "macos") {
|
||||||
// TODO: macOS
|
// TODO: macOS
|
||||||
// See how sysinfo does it... https://docs.rs/sysinfo/0.9.5/sysinfo/trait.ProcessExt.html
|
|
||||||
return Err(BottomError::GenericError {
|
return Err(BottomError::GenericError {
|
||||||
message: "Sorry, macOS support is not implemented yet!".to_string(),
|
message: "Sorry, macOS support is not implemented yet!".to_string(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,8 +37,6 @@ use constants::TICK_RATE_IN_MILLISECONDS;
|
||||||
use data_conversion::*;
|
use data_conversion::*;
|
||||||
use utils::error::{self, BottomError};
|
use utils::error::{self, BottomError};
|
||||||
|
|
||||||
// End imports
|
|
||||||
|
|
||||||
enum Event<I, J> {
|
enum Event<I, J> {
|
||||||
KeyInput(I),
|
KeyInput(I),
|
||||||
MouseInput(J),
|
MouseInput(J),
|
||||||
|
|
Loading…
Reference in New Issue