summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Bassi <calebjbassi@gmail.com>2018-02-25 22:51:51 -0800
committerCaleb Bassi <calebjbassi@gmail.com>2018-02-25 22:51:51 -0800
commit6c1848eea741726641935933582a808c8e430907 (patch)
tree2649b4365035e6a80b021e0634d403aeb9b7be40
parent21aed4b1eafd6cd28b9deef8084c009c38dd8f5f (diff)
Code cleanup and updated README
-rw-r--r--README.md14
-rw-r--r--colorschemes/monokai.go2
-rwxr-xr-xdownload.sh (renamed from install.sh)0
-rw-r--r--termui/colors.go2
-rw-r--r--termui/table.go9
-rw-r--r--widgets/proc.go5
6 files changed, 17 insertions, 15 deletions
diff --git a/README.md b/README.md
index 60935e9..d5a51de 100644
--- a/README.md
+++ b/README.md
@@ -12,18 +12,18 @@ Built with [gopsutil](https://github.com/shirou/gopsutil), [drawille-go](https:/
Binaries are currently available for 32/64bit Linux and 64bit OSX.
-To download the latest binary for your system from GitHub, you can run the [install](https://github.com/cjbassi/gotop/blob/master/install.sh) script:
+To download the latest binary for your system from GitHub, you can run the [download](https://github.com/cjbassi/gotop/blob/master/download.sh) script:
```
-curl https://raw.githubusercontent.com/cjbassi/gotop/master/install.sh | bash
+curl https://raw.githubusercontent.com/cjbassi/gotop/master/download.sh | bash
```
-Then move `gotop` somewhere into your $PATH.
+Then move `gotop` into your $PATH somewhere.
### Arch Linux
-Alternatively, if you're on Arch Linux you can install the `gotop` package from the AUR.
+If you're running Arch Linux, you can install the `gotop` package from the AUR.
### Source
@@ -54,7 +54,7 @@ go get github.com/cjbassi/gotop
### Mouse
* click to select process
-* mouse wheel to scroll Process List
+* mouse wheel to scroll through processes
## Colorschemes
@@ -73,8 +73,8 @@ Feel free to add a new one. You can use 256 colors, bold, underline, and reverse
- command line option to set polling interval for CPU and mem
- command line option to only show processes, CPU, and mem
- zooming in and out of graphs
- - gopsutil issue for darwin i386
-* cleaning up code
+ - gopsutil cross-compiling issue on Linux amd64 for darwin i386
+* code cleanup
- termui buffers should ignore setting characters outside the widget area
- ignore writes or give an error?
- termui Blocks should be indexed at 0, and maybe change their X and Y variables too
diff --git a/colorschemes/monokai.go b/colorschemes/monokai.go
index 918f31a..ae649d1 100644
--- a/colorschemes/monokai.go
+++ b/colorschemes/monokai.go
@@ -7,7 +7,7 @@ var Monokai = Colorscheme{
BorderLabel: 249,
BorderLine: 239,
- CPULines: []int{208, 70, 197, 81, 249, 141, 221, 186},
+ CPULines: []int{197, 208, 70, 81, 249, 141, 221, 186},
MainMem: 208,
SwapMem: 186,
diff --git a/install.sh b/download.sh
index f830e9f..f830e9f 100755
--- a/install.sh
+++ b/download.sh
diff --git a/termui/colors.go b/termui/colors.go
index 2fdacd3..f1de7bf 100644
--- a/termui/colors.go
+++ b/termui/colors.go
@@ -26,7 +26,7 @@ var DefaultTheme = Colorscheme{
BorderBg: -1,
Sparkline: 4,
- LineGraph: -1,
+ LineGraph: 0,
TableCursor: 4,
GaugeColor: 7,
}
diff --git a/termui/table.go b/termui/table.go
index d18bdc6..c5d8909 100644
--- a/termui/table.go
+++ b/termui/table.go
@@ -16,8 +16,8 @@ type Table struct {
UniqueCol int // the column used to identify the selected item
SelectedItem string // used to keep the cursor on the correct item if the data changes
SelectedRow int
- TopRow int // used to indicate where in the table we are scrolled at
- ColResizer func()
+ TopRow int // used to indicate where in the table we are scrolled at
+ ColResizer func() // for widgets that inherit a Table and want to overload the ColResize method
}
// NewTable returns a new Table instance
@@ -104,8 +104,9 @@ func (t *Table) Buffer() *Buffer {
return buf
}
-////////////////////////////////////////////////////////////////////////////////
-// Cursor movement
+/////////////////////////////////////////////////////////////////////////////////
+// Cursor Movement //
+/////////////////////////////////////////////////////////////////////////////////
// calcPos is used to calculate the cursor position and where in the process list we are located.
func (t *Table) calcPos() {
diff --git a/widgets/proc.go b/widgets/proc.go
index f08367e..d47f69f 100644
--- a/widgets/proc.go
+++ b/widgets/proc.go
@@ -292,8 +292,9 @@ func (p *Proc) Kill() {
cmd.Start()
}
-////////////////////////////////////////////////////////////////////////////////
-// Sorting
+/////////////////////////////////////////////////////////////////////////////////
+// []Process Sorting //
+/////////////////////////////////////////////////////////////////////////////////
type ProcessByCPU []Process