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'.
|
|
|
|
|
|
|
|
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
|
|
|
*/
|
|
|
|
|
|
|
|
type Colorscheme struct {
|
2018-04-14 22:32:04 +08:00
|
|
|
Default int32
|
2018-02-21 15:56:37 +08:00
|
|
|
|
2018-04-14 22:32:04 +08:00
|
|
|
BorderLabel int32
|
|
|
|
BorderLine int32
|
2018-02-21 18:24:36 +08:00
|
|
|
|
2018-03-04 09:05:52 +08:00
|
|
|
// should add at least 8 here
|
2018-04-14 22:32:04 +08:00
|
|
|
CPULines []int32
|
2018-02-21 18:24:36 +08:00
|
|
|
|
2018-04-14 22:32:04 +08:00
|
|
|
MainMem int32
|
|
|
|
SwapMem int32
|
2018-02-21 18:24:36 +08:00
|
|
|
|
2018-04-14 22:32:04 +08:00
|
|
|
ProcCursor int32
|
2018-02-21 18:24:36 +08:00
|
|
|
|
2018-04-14 22:32:04 +08:00
|
|
|
Sparkline int32
|
2018-02-21 18:24:36 +08:00
|
|
|
|
2018-04-14 22:32:04 +08:00
|
|
|
DiskBar int32
|
2018-02-21 18:24:36 +08:00
|
|
|
|
2018-03-04 09:05:52 +08:00
|
|
|
// colors the temperature number a different color if it's over a certain threshold
|
2018-04-14 22:32:04 +08:00
|
|
|
TempLow int32
|
|
|
|
TempHigh int32
|
2018-02-21 15:56:37 +08:00
|
|
|
}
|
2018-04-14 22:32:04 +08:00
|
|
|
|
|
|
|
const (
|
|
|
|
ColorBlack = 0x000000
|
|
|
|
ColorMaroon = 0x800000
|
|
|
|
ColorGreen = 0x008000
|
|
|
|
ColorOlive = 0x808000
|
|
|
|
ColorNavy = 0x000080
|
|
|
|
ColorPurple = 0x800080
|
|
|
|
ColorTeal = 0x008080
|
|
|
|
ColorSilver = 0xC0C0C0
|
|
|
|
ColorGray = 0x808080
|
|
|
|
ColorRed = 0xFF0000
|
|
|
|
ColorLime = 0x00FF00
|
|
|
|
ColorYellow = 0xFFFF00
|
|
|
|
ColorBlue = 0x0000FF
|
|
|
|
ColorFuchsia = 0xFF00FF
|
|
|
|
ColorAqua = 0x00FFFF
|
|
|
|
ColorWhite = 0xFFFFFF
|
|
|
|
)
|