From 38d7736ca07da3d7c075ff63641d9dd97baa3900 Mon Sep 17 00:00:00 2001 From: "Sean E. Russell" Date: Thu, 13 Feb 2020 16:26:28 -0600 Subject: [PATCH] Switching maintainership. --- CHANGELOG.md | 11 +++++++++ README.md | 52 +++++++---------------------------------- build/nfpm.yml | 8 +++---- cmd/gotop/main.go | 12 +++++----- config.go | 5 ++-- go.mod | 2 +- layout/layout.go | 6 ++--- scripts/download.sh | 4 ++-- snap/snapcraft.yaml | 6 ++--- termui/linegraph.go | 2 +- widgets/battery.go | 2 +- widgets/cpu.go | 2 +- widgets/disk.go | 4 ++-- widgets/mem.go | 4 ++-- widgets/mem_freebsd.go | 2 +- widgets/net.go | 4 ++-- widgets/proc.go | 4 ++-- widgets/proc_freebsd.go | 2 +- widgets/proc_other.go | 2 +- widgets/temp.go | 2 +- widgets/temp_darwin.go | 2 +- widgets/temp_freebsd.go | 2 +- widgets/temp_linux.go | 2 +- widgets/temp_openbsd.go | 2 +- widgets/temp_windows.go | 2 +- 25 files changed, 61 insertions(+), 85 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a421585..87beac6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > - **Fixed**: for any bug fixes. > - **Security**: in case of vulnerabilities. +## [3.1.0] - 2020-02-13 + +Re-homed the project after the original fork (trunk?) was marked as +unmaintained by cjbassi. + +- Merges @HowJMay spelling fixes +- Merges @markuspeloquin solarized themes +- Merges @jrswab additional kill terms +- Adds the ability to lay out the UI using a text file +- Changed the project filesystem layout to be more idiomatic + ## [Unreleased] ### Added diff --git a/README.md b/README.md index 4627fa9..d04999b 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ 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/)! +The original author of gotop has re-implemented the application in Rust, as [ytop](https://github.com/cjbassi/ytop). This is a fork of original gotop project with a new maintainer. + @@ -19,52 +21,16 @@ Working and tested on Linux, FreeBSD and macOS. Windows support is planned. Open ### Source ```bash -go get github.com/cjbassi/gotop +go get github.com/xxxserxxx/gotop/... ``` ### Prebuilt binaries **Note**: Doesn't require Go. -Clone the repo and then run [scripts/download.sh](./scripts/download.sh) to download the correct binary for your system from the [releases tab](https://github.com/cjbassi/gotop/releases): +Visit [here](https://github.com/xxxserxxx/gotop/releases) with your web browser and download a version that works for you. -```bash -git clone --depth 1 https://github.com/cjbassi/gotop /tmp/gotop -/tmp/gotop/scripts/download.sh -``` - -Then move `gotop` into your `$PATH` somewhere. - -### Arch Linux - -Install `gotop`, `gotop-bin`, or `gotop-git` from the AUR. - -### FreeBSD - -```bash -pkg install gotop -``` - -### Homebrew - -```bash -brew tap cjbassi/gotop -brew install gotop -``` - -### Snap - -```bash -snap install gotop-cjbassi -``` - -**Note**: You may need to enable certain permissions for all of the widgets to work: - -```bash -snap connect gotop-cjbassi:hardware-observe -snap connect gotop-cjbassi:mount-observe -snap connect gotop-cjbassi:system-observe -``` +Unzip it and then move `gotop` into your `$PATH` somewhere. If you're on a Debian or Redhat derivative, you can download an `.rpm` or `.deb` to install. ## Usage @@ -82,7 +48,9 @@ snap connect gotop-cjbassi:system-observe - `G` and ``: jump to bottom - Process actions: - ``: toggle process grouping - - `dd`: kill selected process or group of processes + - `dd`: kill selected process or group of processes with SIGTERM + - `d3`: kill selected process or group of processes with SIGQUIT + - `d9`: kill selected process or group of processes with SIGKILL - Process sorting - `c`: CPU - `m`: Mem @@ -194,7 +162,3 @@ build massive edifices, you're in for disappointment. - [shirou/gopsutil](https://github.com/shirou/gopsutil) - [goreleaser/nfpm](https://github.com/goreleaser/nfpm) - [distatus/battery](https://github.com/distatus/battery) - -## Stargazers over time - -[![Stargazers over time](https://starcharts.herokuapp.com/cjbassi/gotop.svg)](https://starcharts.herokuapp.com/cjbassi/gotop) diff --git a/build/nfpm.yml b/build/nfpm.yml index 1e9501a..67b575b 100644 --- a/build/nfpm.yml +++ b/build/nfpm.yml @@ -4,12 +4,12 @@ platform: "linux" version: "v${VERSION}" section: "default" priority: "extra" -maintainer: "Caleb Bassi " +maintainer: "Sean Russell " description: | A terminal based graphical activity monitor inspired by gtop and vtop -vendor: "Caleb Bassi" -homepage: "https://github.com/cjbassi/gotop" +vendor: "Sean Russell" +homepage: "https://github.com/xxxserxxx/gotop" license: "GNU Affero General Public License v3.0" bindir: "/usr/local/bin" files: - /tmp/dist/gotop: "/usr/local/bin/gotop" + dist/gotop: "/usr/local/bin/gotop" diff --git a/cmd/gotop/main.go b/cmd/gotop/main.go index b75c96a..0634564 100644 --- a/cmd/gotop/main.go +++ b/cmd/gotop/main.go @@ -16,12 +16,12 @@ import ( docopt "github.com/docopt/docopt.go" ui "github.com/gizak/termui/v3" - "github.com/cjbassi/gotop" - "github.com/cjbassi/gotop/colorschemes" - "github.com/cjbassi/gotop/layout" - "github.com/cjbassi/gotop/logging" - "github.com/cjbassi/gotop/utils" - w "github.com/cjbassi/gotop/widgets" + "github.com/xxxserxxx/gotop" + "github.com/xxxserxxx/gotop/colorschemes" + "github.com/xxxserxxx/gotop/layout" + "github.com/xxxserxxx/gotop/logging" + "github.com/xxxserxxx/gotop/utils" + w "github.com/xxxserxxx/gotop/widgets" ) const ( diff --git a/config.go b/config.go index 45b7742..8ce09ae 100644 --- a/config.go +++ b/config.go @@ -4,10 +4,11 @@ import ( "io" "time" - "github.com/cjbassi/gotop/colorschemes" - "github.com/cjbassi/gotop/widgets" + "github.com/xxxserxxx/gotop/colorschemes" + "github.com/xxxserxxx/gotop/widgets" ) +// TODO: Cross-compiling for darwin, openbsd requiring native procs & temps type Config struct { ConfigDir string LogDir string diff --git a/go.mod b/go.mod index 3593ae5..27bb259 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/cjbassi/gotop +module github.com/xxxserxxx/gotop require ( github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect diff --git a/layout/layout.go b/layout/layout.go index 3f892dd..7bafc9f 100644 --- a/layout/layout.go +++ b/layout/layout.go @@ -5,8 +5,8 @@ import ( "log" "sort" - "github.com/cjbassi/gotop" - "github.com/cjbassi/gotop/widgets" + "github.com/xxxserxxx/gotop" + "github.com/xxxserxxx/gotop/widgets" ui "github.com/gizak/termui/v3" ) @@ -29,7 +29,7 @@ type MyGrid struct { var widgetNames []string = []string{"cpu", "disk", "mem", "temp", "net", "procs", "batt"} -// BUG 2:disk mem\nnet loses the widget from the second line +// FIXME 2:disk mem\nnet loses the widget from the second line func Layout(wl layout, c gotop.Config) (*MyGrid, error) { rowDefs := wl.Rows uiRows := make([]ui.GridItem, 0) diff --git a/scripts/download.sh b/scripts/download.sh index a525b2a..4c1ec75 100755 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -8,9 +8,9 @@ function get_latest_release { } function download { - RELEASE=$(get_latest_release 'cjbassi/gotop') + RELEASE=$(get_latest_release 'xxxserxxx/gotop') ARCHIVE=gotop_${RELEASE}_${1}.tgz - curl -LO https://github.com/cjbassi/gotop/releases/download/${RELEASE}/${ARCHIVE} + curl -LO https://github.com/xxxserxxx/gotop/releases/download/${RELEASE}/${ARCHIVE} tar xf ${ARCHIVE} rm ${ARCHIVE} } diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index bb81316..de17ee7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,4 +1,4 @@ -name: gotop-cjbassi +name: gotop-xxxserxxx base: core18 version: determined-by-version-script version-script: git describe --always --tags --dirty @@ -15,7 +15,7 @@ parts: gotop: source: . plugin: go - go-importpath: github.com/cjbassi/gotop + go-importpath: github.com/xxxserxxx/gotop build-packages: - git-core - gcc @@ -31,7 +31,7 @@ plugs: system-observe: apps: - gotop-cjbassi: + gotop-xxxserxxx: command: bin/gotop environment: LANG: C.UTF-8 diff --git a/termui/linegraph.go b/termui/linegraph.go index 86179a2..63900c1 100644 --- a/termui/linegraph.go +++ b/termui/linegraph.go @@ -4,7 +4,7 @@ import ( "image" "sort" - drawille "github.com/cjbassi/gotop/termui/drawille-go" + drawille "github.com/xxxserxxx/gotop/termui/drawille-go" . "github.com/gizak/termui/v3" ) diff --git a/widgets/battery.go b/widgets/battery.go index b6cab39..89620bb 100644 --- a/widgets/battery.go +++ b/widgets/battery.go @@ -9,7 +9,7 @@ import ( "github.com/distatus/battery" - ui "github.com/cjbassi/gotop/termui" + ui "github.com/xxxserxxx/gotop/termui" ) type BatteryWidget struct { diff --git a/widgets/cpu.go b/widgets/cpu.go index 66da81c..8e8819c 100644 --- a/widgets/cpu.go +++ b/widgets/cpu.go @@ -8,7 +8,7 @@ import ( psCpu "github.com/shirou/gopsutil/cpu" - ui "github.com/cjbassi/gotop/termui" + ui "github.com/xxxserxxx/gotop/termui" ) type CpuWidget struct { diff --git a/widgets/disk.go b/widgets/disk.go index f8b305b..d20b078 100644 --- a/widgets/disk.go +++ b/widgets/disk.go @@ -9,8 +9,8 @@ import ( psDisk "github.com/shirou/gopsutil/disk" - ui "github.com/cjbassi/gotop/termui" - "github.com/cjbassi/gotop/utils" + ui "github.com/xxxserxxx/gotop/termui" + "github.com/xxxserxxx/gotop/utils" ) type Partition struct { diff --git a/widgets/mem.go b/widgets/mem.go index 5b4a82c..d5bd67d 100644 --- a/widgets/mem.go +++ b/widgets/mem.go @@ -7,8 +7,8 @@ import ( psMem "github.com/shirou/gopsutil/mem" - ui "github.com/cjbassi/gotop/termui" - "github.com/cjbassi/gotop/utils" + ui "github.com/xxxserxxx/gotop/termui" + "github.com/xxxserxxx/gotop/utils" ) type MemWidget struct { diff --git a/widgets/mem_freebsd.go b/widgets/mem_freebsd.go index f3dd983..0d5b0b6 100644 --- a/widgets/mem_freebsd.go +++ b/widgets/mem_freebsd.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) func convert(s []string) (MemoryInfo, error) { diff --git a/widgets/net.go b/widgets/net.go index d90669f..dd051e8 100644 --- a/widgets/net.go +++ b/widgets/net.go @@ -7,8 +7,8 @@ import ( psNet "github.com/shirou/gopsutil/net" - ui "github.com/cjbassi/gotop/termui" - "github.com/cjbassi/gotop/utils" + ui "github.com/xxxserxxx/gotop/termui" + "github.com/xxxserxxx/gotop/utils" ) const ( diff --git a/widgets/proc.go b/widgets/proc.go index 03f1de9..58ad6dd 100644 --- a/widgets/proc.go +++ b/widgets/proc.go @@ -10,8 +10,8 @@ import ( psCPU "github.com/shirou/gopsutil/cpu" - ui "github.com/cjbassi/gotop/termui" - "github.com/cjbassi/gotop/utils" + ui "github.com/xxxserxxx/gotop/termui" + "github.com/xxxserxxx/gotop/utils" ) const ( diff --git a/widgets/proc_freebsd.go b/widgets/proc_freebsd.go index a8b213d..ac3e73f 100644 --- a/widgets/proc_freebsd.go +++ b/widgets/proc_freebsd.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) type processList struct { diff --git a/widgets/proc_other.go b/widgets/proc_other.go index c0d13e7..09aac28 100644 --- a/widgets/proc_other.go +++ b/widgets/proc_other.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) const ( diff --git a/widgets/temp.go b/widgets/temp.go index 6d49365..86e6e76 100644 --- a/widgets/temp.go +++ b/widgets/temp.go @@ -8,7 +8,7 @@ import ( ui "github.com/gizak/termui/v3" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) type TempScale int diff --git a/widgets/temp_darwin.go b/widgets/temp_darwin.go index d7d892c..2f5cde3 100644 --- a/widgets/temp_darwin.go +++ b/widgets/temp_darwin.go @@ -6,7 +6,7 @@ import "C" import ( "log" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) type TemperatureStat struct { diff --git a/widgets/temp_freebsd.go b/widgets/temp_freebsd.go index 035226f..fcc6cda 100644 --- a/widgets/temp_freebsd.go +++ b/widgets/temp_freebsd.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) var sensorOIDS = map[string]string{ diff --git a/widgets/temp_linux.go b/widgets/temp_linux.go index 47b27c9..674599e 100644 --- a/widgets/temp_linux.go +++ b/widgets/temp_linux.go @@ -6,7 +6,7 @@ import ( psHost "github.com/shirou/gopsutil/host" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) func (self *TempWidget) update() { diff --git a/widgets/temp_openbsd.go b/widgets/temp_openbsd.go index 4606c2c..8d0dc63 100644 --- a/widgets/temp_openbsd.go +++ b/widgets/temp_openbsd.go @@ -12,7 +12,7 @@ import ( "syscall" "unsafe" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) func (self *TempWidget) getTemp(mib []C.int, mlen int, snsrdev *C.struct_sensordev, index int) { diff --git a/widgets/temp_windows.go b/widgets/temp_windows.go index 71fb6f1..8160900 100644 --- a/widgets/temp_windows.go +++ b/widgets/temp_windows.go @@ -5,7 +5,7 @@ import ( psHost "github.com/shirou/gopsutil/host" - "github.com/cjbassi/gotop/utils" + "github.com/xxxserxxx/gotop/utils" ) func (self *TempWidget) update() {