gotop/colorschemes/template.go

46 lines
797 B
Go
Raw Normal View History

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-03-04 09:05:52 +08:00
You can combine a color with 'Bold', 'Underline', or 'Reverse' by using bitwise OR ('|') and the name of the attribute.
2018-02-28 05:25:08 +08:00
For example, to get Bold red Labels, you would do 'Labels: 2 | Bold'.
2018-04-14 13:17:57 +08:00
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
*/
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-03-04 09:05:52 +08:00
// should add at least 8 here
2018-02-21 18:24:36 +08:00
CPULines []int
MainMem int
SwapMem int
ProcCursor int
Sparkline int
DiskBar int
2018-03-04 09:05:52 +08:00
// colors the temperature number a different color 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
}