2018-02-21 15:56:37 +08:00
|
|
|
package colorschemes
|
|
|
|
|
|
|
|
/*
|
2018-02-28 05:25:08 +08:00
|
|
|
The standard 256 terminal colors are supported.
|
2018-02-21 15:56:37 +08:00
|
|
|
|
|
|
|
-1 = clear
|
|
|
|
|
2018-02-28 05:25:08 +08:00
|
|
|
You can combine a color with 'Bold', 'Underline', or 'Reverse' by using bitwise OR ('|').
|
|
|
|
For example, to get Bold red Labels, you would do 'Labels: 2 | Bold'.
|
|
|
|
|
|
|
|
Once you've created a colorscheme, add an entry for it in the `handleColorscheme` function
|
|
|
|
in `gotop.go`.
|
2018-02-21 15:56:37 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
// Ignore this
|
|
|
|
const (
|
|
|
|
Bold int = 1 << (iota + 9)
|
|
|
|
Underline
|
|
|
|
Reverse
|
|
|
|
)
|
|
|
|
|
|
|
|
type Colorscheme struct {
|
|
|
|
Name string
|
|
|
|
Author string
|
|
|
|
|
2018-02-22 03:15:53 +08:00
|
|
|
Fg int
|
2018-02-21 15:56:37 +08:00
|
|
|
Bg int
|
|
|
|
|
2018-02-21 18:24:36 +08:00
|
|
|
BorderLabel int
|
|
|
|
BorderLine int
|
|
|
|
|
2018-02-22 04:09:46 +08:00
|
|
|
// Try to add at least 8
|
2018-02-21 18:24:36 +08:00
|
|
|
CPULines []int
|
|
|
|
|
|
|
|
MainMem int
|
|
|
|
SwapMem int
|
|
|
|
|
|
|
|
ProcCursor int
|
|
|
|
|
|
|
|
Sparkline int
|
|
|
|
|
|
|
|
DiskBar int
|
|
|
|
|
2018-02-22 03:15:53 +08:00
|
|
|
// Temperature colors depending on if it's over a certain threshold
|
2018-02-21 18:24:36 +08:00
|
|
|
TempLow int
|
|
|
|
TempHigh int
|
2018-02-21 15:56:37 +08:00
|
|
|
}
|