Another terminal based graphical activity monitor, inspired by [gtop](https://github.com/aksakalli/gtop) and [vtop](https://github.com/MrRio/vtop), this time written in [Go](https://golang.org/)!
Working and tested on Linux, FreeBSD and MacOS. Windows binaries are provided, but have limited testing. OpenBSD works with some caveats; cross-compiling is difficult and binaries are not provided.
If you install gotop by hand, or you download or create new layouts or colorschemes, you will need to put the layout files where gotop can find them. To see the list of directories gotop looks for files, run `gotop -h`. The first directory is always the directory from which gotop is run.
`gotop` is available on [guru](https://gitweb.gentoo.org/repo/proj/guru.git) overlay. It's currently required to add this overlay in order to install `gotop`:
gotop can be installed with [Homebrew](https://brew.sh/); you'll need to tap the recipe. If you'd previously tapped cjbassi's recipe, you'll want to untap that first. The old version of gotop is also included in Homebrew's core library, and that will always be chosen before any taps, so you have to specify the tap specifically.
This doesn't require Go, is easy, and works across distributions. You have to manually upgrade the executable yourself, though, so using your distribution's package (if one is available) is a better approach.
Visit [the releases page](https://github.com/xxxserxxx/gotop/releases) with your web browser and download the appropriate file for your OS and architecture. Unzip it (the archive contains a single file) and then move the resulting `gotop` binary into your `$PATH` somewhere. If you're on a Debian or Redhat derivative, you can download an `.rpm` or `.deb` and install that.
Most command-line settings can be persisted into a configuration file. The config file is named `gotop.conf` and can be located in several places. The first place gotop will look is in the current directory; after this, the locations depend on the OS and distribution. On Linux using XDG, for instance, the home location of `~/.config/gotop/gotop.conf` is the second location. The last location is a system-wide global location, such as `/etc/gotop/gotop.conf`. The `-h` help command will print out all of the locations, in order. Command-line options override values in any config files, and only the first config file found is loaded.
A configuration file can be created using the `--write-config` command-line argument. This will try to place the config file in the home config directory (the second location), but if it's unable to do so it'll write a file to the current directory.
Config file changes can be made by combining command-line arguments with `--write-config`. For example, to persist the `solarized` theme, call:
gotop ships with a few colorschemes which can be set with the `-c` flag followed by the name of one. You can find all the colorschemes in the [colorschemes folder](./colorschemes).
To make a custom colorscheme, check out the [template](./colorschemes/template.go) for instructions and then use [default.json](./colorschemes/default.json) as a starter. Then put the file at `~/.config/gotop/<name>.json` and load it with `gotop -c <name>`. Colorschemes PR's are welcome!
Some devices have quite a number of data points; on OSX, for instance, there are dozens of temperature readings. These can be filtered through a configuration file. There is no command-line argument for this filter.
The list will grow, but for now the only device that supports filtering is the temperature widget. The configuration entry is called `temperature`, and it contains an exact-match list of comma-separated values with no spaces. To see the list of valid values, run gotop with the `--list devices` command. Gotop will print out the type of device and the legal values. For example, on Linux:
```
$ gotop --list devices
Temperatures:
acpitz
nvme_composite
nvme_sensor1
nvme_sensor2
pch_cannonlake
coretemp_packageid0
coretemp_core0
coretemp_core1
coretemp_core2
coretemp_core3
ath10k_hwmon
```
You might then add the following line to the config file. First, find where gotop looks for config files:
```
$ gotop -h | tail -n 6
Colorschemes & layouts that are not built-in are searched for (in order) in:
The original author of gotop started a new tool in Rust, called [ytop](https://github.com/cjbassi/ytop). This repository is a fork of original gotop project with a new maintainer.