mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
27 lines
412 B
Go
27 lines
412 B
Go
package views
|
|
|
|
import (
|
|
"strings"
|
|
|
|
ui "github.com/gizak/termui"
|
|
)
|
|
|
|
var helpDialog = []string{
|
|
"[h] - open this help dialog",
|
|
"[q] - exit ctop",
|
|
}
|
|
|
|
func Help() {
|
|
p := ui.NewPar(strings.Join(helpDialog, "\n"))
|
|
p.Height = 10
|
|
p.Width = 50
|
|
p.TextFgColor = ui.ColorWhite
|
|
p.BorderLabel = "Help"
|
|
p.BorderFg = ui.ColorCyan
|
|
ui.Render(p)
|
|
ui.Handle("/sys/kbd/", func(ui.Event) {
|
|
ui.StopLoop()
|
|
})
|
|
ui.Loop()
|
|
}
|