## Installation
![](https://github.com/xxxserxxx/gotop/workflows/Build%20Go%20binaries/badge.svg)
![](https://github.com/xxxserxxx/gotop/workflows/Create%20pre-release/badge.svg)
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.
### Arch
AUR contains entries for `gotop` and `gotop-bin`. `gotop-git` still points at the old, unmaintained, repository for the moment.
```
yay -S gotop-bin
```
There is also a build-from-source package:
```
yay -S gotop
```
### Gentoo
`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`:
```shell
sudo layman -a guru
sudo emerge gotop
```
### OSX
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.
```
brew uninstall gotop # If previously installed
brew untap cjbassi/gotop # If previously tapped
brew tap xxxserxxx/gotop
brew install xxxserxxx/gotop/gotop
```
### Prebuilt binaries
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.
### Source
This requires Go, and at the moment, Go 1.14 specifically.
```bash
go get -u github.com/xxxserxxx/gotop/cmd/gotop
```
If you don't have Go 1.14, you will want to follow the Building instructions in the next section.
### Building
This is the download & compile approach.
gotop should build with most versions of Go. If you have a version other than 1.14 installed, remove the `go` line at the end of `go.mod`.
```
git clone https://github.com/xxxserxxx/gotop.git
cd gotop
sed -i '/^go/d' go.mod # Do this if you have go != 1.14
go build -o gotop ./cmd/gotop
```
Move `gotop` to somewhere in your `$PATH`.
## Usage
### Keybinds
- Quit: `q` or `