|
|
|
@ -268,6 +268,7 @@ type ColorTheme struct {
|
|
|
|
|
Selected ColorAttr
|
|
|
|
|
Header ColorAttr
|
|
|
|
|
Border ColorAttr
|
|
|
|
|
BorderLabel ColorAttr
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Event struct {
|
|
|
|
@ -441,6 +442,7 @@ var (
|
|
|
|
|
ColBorder ColorPair
|
|
|
|
|
ColPreview ColorPair
|
|
|
|
|
ColPreviewBorder ColorPair
|
|
|
|
|
ColBorderLabel ColorPair
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func EmptyTheme() *ColorTheme {
|
|
|
|
@ -463,7 +465,9 @@ func EmptyTheme() *ColorTheme {
|
|
|
|
|
Cursor: ColorAttr{colUndefined, AttrUndefined},
|
|
|
|
|
Selected: ColorAttr{colUndefined, AttrUndefined},
|
|
|
|
|
Header: ColorAttr{colUndefined, AttrUndefined},
|
|
|
|
|
Border: ColorAttr{colUndefined, AttrUndefined}}
|
|
|
|
|
Border: ColorAttr{colUndefined, AttrUndefined},
|
|
|
|
|
BorderLabel: ColorAttr{colUndefined, AttrUndefined},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NoColorTheme() *ColorTheme {
|
|
|
|
@ -486,7 +490,9 @@ func NoColorTheme() *ColorTheme {
|
|
|
|
|
Cursor: ColorAttr{colDefault, AttrRegular},
|
|
|
|
|
Selected: ColorAttr{colDefault, AttrRegular},
|
|
|
|
|
Header: ColorAttr{colDefault, AttrRegular},
|
|
|
|
|
Border: ColorAttr{colDefault, AttrRegular}}
|
|
|
|
|
Border: ColorAttr{colDefault, AttrRegular},
|
|
|
|
|
BorderLabel: ColorAttr{colDefault, AttrRegular},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func errorExit(message string) {
|
|
|
|
@ -514,7 +520,9 @@ func init() {
|
|
|
|
|
Cursor: ColorAttr{colRed, AttrUndefined},
|
|
|
|
|
Selected: ColorAttr{colMagenta, AttrUndefined},
|
|
|
|
|
Header: ColorAttr{colCyan, AttrUndefined},
|
|
|
|
|
Border: ColorAttr{colBlack, AttrUndefined}}
|
|
|
|
|
Border: ColorAttr{colBlack, AttrUndefined},
|
|
|
|
|
BorderLabel: ColorAttr{colWhite, AttrUndefined},
|
|
|
|
|
}
|
|
|
|
|
Dark256 = &ColorTheme{
|
|
|
|
|
Colored: true,
|
|
|
|
|
Input: ColorAttr{colDefault, AttrUndefined},
|
|
|
|
@ -534,7 +542,9 @@ func init() {
|
|
|
|
|
Cursor: ColorAttr{161, AttrUndefined},
|
|
|
|
|
Selected: ColorAttr{168, AttrUndefined},
|
|
|
|
|
Header: ColorAttr{109, AttrUndefined},
|
|
|
|
|
Border: ColorAttr{59, AttrUndefined}}
|
|
|
|
|
Border: ColorAttr{59, AttrUndefined},
|
|
|
|
|
BorderLabel: ColorAttr{145, AttrUndefined},
|
|
|
|
|
}
|
|
|
|
|
Light256 = &ColorTheme{
|
|
|
|
|
Colored: true,
|
|
|
|
|
Input: ColorAttr{colDefault, AttrUndefined},
|
|
|
|
@ -554,7 +564,9 @@ func init() {
|
|
|
|
|
Cursor: ColorAttr{161, AttrUndefined},
|
|
|
|
|
Selected: ColorAttr{168, AttrUndefined},
|
|
|
|
|
Header: ColorAttr{31, AttrUndefined},
|
|
|
|
|
Border: ColorAttr{145, AttrUndefined}}
|
|
|
|
|
Border: ColorAttr{145, AttrUndefined},
|
|
|
|
|
BorderLabel: ColorAttr{59, AttrUndefined},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func initTheme(theme *ColorTheme, baseTheme *ColorTheme, forceBlack bool) {
|
|
|
|
@ -590,6 +602,7 @@ func initTheme(theme *ColorTheme, baseTheme *ColorTheme, forceBlack bool) {
|
|
|
|
|
theme.Selected = o(baseTheme.Selected, theme.Selected)
|
|
|
|
|
theme.Header = o(baseTheme.Header, theme.Header)
|
|
|
|
|
theme.Border = o(baseTheme.Border, theme.Border)
|
|
|
|
|
theme.BorderLabel = o(baseTheme.BorderLabel, theme.BorderLabel)
|
|
|
|
|
|
|
|
|
|
initPalette(theme)
|
|
|
|
|
}
|
|
|
|
@ -622,6 +635,7 @@ func initPalette(theme *ColorTheme) {
|
|
|
|
|
ColInfo = pair(theme.Info, theme.Bg)
|
|
|
|
|
ColHeader = pair(theme.Header, theme.Bg)
|
|
|
|
|
ColBorder = pair(theme.Border, theme.Bg)
|
|
|
|
|
ColBorderLabel = pair(theme.BorderLabel, theme.Bg)
|
|
|
|
|
ColPreview = pair(theme.PreviewFg, theme.PreviewBg)
|
|
|
|
|
ColPreviewBorder = pair(theme.Border, theme.PreviewBg)
|
|
|
|
|
}
|
|
|
|
|