This commit is contained in:
Caleb Bassi 2018-04-14 09:01:15 -07:00
parent 4d809023d3
commit fdf5ef2555
3 changed files with 11 additions and 4 deletions

View File

@ -85,11 +85,11 @@ Feel free to add a new one. You can use 256 colors, bold, underline, and reverse
## Built With
* [A termui fork](https://github.com/cjbassi/termui)
* [drawille-go](https://github.com/exrook/drawille-go)
* [My termui fork](https://github.com/cjbassi/termui)
* [drawille-go](https://github.com/exrook/drawille-go)
* [termbox](https://github.com/nsf/termbox-go)
* [gopsutil](https://github.com/shirou/gopsutil)
* [goreleaser](https://github.com/goreleaser/goreleaser)
* [termbox](https://github.com/nsf/termbox-go)
## Stargazers over time

View File

@ -285,7 +285,7 @@ func main() {
}
}()
// handles os kill signal
// handles kill signal sent to gotop
c := make(chan os.Signal, 2)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {

View File

@ -7,15 +7,22 @@ import (
"time"
ui "github.com/cjbassi/termui"
"github.com/mattn/go-runewidth"
psCPU "github.com/shirou/gopsutil/cpu"
psProc "github.com/shirou/gopsutil/process"
)
var arrowWidth int
const (
UP = "▲"
DOWN = "▼"
)
func init() {
arrowWidth = runewidth.StringWidth(UP)
}
// Process represents each process.
type Process struct {
PID int32