xmtop/colorschemes/template.go

47 lines
800 B
Go
Raw Normal View History

2018-02-20 23:56:37 -08:00
package colorschemes
/*
2018-02-27 13:25:08 -08:00
The standard 256 terminal colors are supported.
2018-02-20 23:56:37 -08:00
-1 = clear
You can combine a color with 'Bold', 'Underline', or 'Reverse' by using bitwise OR ('|') and the name of the Color.
2018-02-27 13:25:08 -08:00
For example, to get Bold red Labels, you would do 'Labels: 2 | Bold'.
2018-05-04 15:32:07 -07:00
Once you've created a colorscheme, add an entry for it in the `handleColorscheme` function in 'main.go'.
2018-02-20 23:56:37 -08:00
*/
const (
Bold int = 1 << (iota + 9)
Underline
Reverse
)
type Colorscheme struct {
Name string
Author string
2018-02-21 11:15:53 -08:00
Fg int
2018-02-20 23:56:37 -08:00
Bg int
2018-02-21 02:24:36 -08:00
BorderLabel int
BorderLine int
2018-03-03 17:05:52 -08:00
// should add at least 8 here
2018-02-21 02:24:36 -08:00
CPULines []int
BattLines []int
2020-02-28 10:03:41 -06:00
MemLines []int
2018-02-21 02:24:36 -08:00
ProcCursor int
Sparkline int
DiskBar int
2018-03-03 17:05:52 -08:00
// colors the temperature number a different color if it's over a certain threshold
2018-02-21 02:24:36 -08:00
TempLow int
TempHigh int
2018-02-20 23:56:37 -08:00
}