Files

24 lines
461 B
Go
Raw Permalink Normal View History

2017-03-08 10:40:03 +11:00
package main
2017-03-15 10:02:46 +10:00
import (
"github.com/bcicen/ctop/theme"
2017-03-15 10:02:46 +10:00
ui "github.com/gizak/termui"
)
2017-03-08 10:40:03 +11:00
var ColorMap map[string]ui.Attribute
2017-03-08 10:40:03 +11:00
// SetColorMap installs the color scheme for the currently selected theme
func SetColorMap() {
ColorMap = theme.BuildColorMap()
2017-03-08 10:40:03 +11:00
}
2017-03-15 10:02:46 +10:00
// InvertColorMap switches to the inverse (light/dark) flavor
2017-03-15 10:02:46 +10:00
func InvertColorMap() {
if theme.Current() == theme.Latte {
theme.Set(theme.Mocha)
} else {
theme.Set(theme.Latte)
2017-03-15 10:02:46 +10:00
}
SetColorMap()
}