Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Solarized theme fixes #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions colorschemes/solarized.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package colorschemes

// This is a neutral version of the Solarized 256-color palette. The exception
// is that the one grey color uses the average of base0 and base00, which are
// already middle of the road.
var Solarized = Colorscheme{
Fg: 250,
Fg: -1,
Bg: -1,

BorderLabel: 250,
BorderLabel: -1,
BorderLine: 37,

CPULines: []int{61, 33, 37, 64, 125, 160, 166, 136},
Expand All @@ -18,7 +21,7 @@ var Solarized = Colorscheme{

Sparkline: 33,

DiskBar: 245,
DiskBar: 243,

TempLow: 64,
TempHigh: 160,
Expand Down
27 changes: 27 additions & 0 deletions colorschemes/solarized16-dark.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package colorschemes

// This scheme assumes the terminal already uses Solarized. Only DiskBar is
// different between dark/light.
var Solarized16Dark = Colorscheme{
Fg: -1,
Bg: -1,

BorderLabel: -1,
BorderLine: 6,

CPULines: []int{13, 4, 6, 2, 5, 1, 9, 3},

BattLines: []int{13, 4, 6, 2, 5, 1, 9, 3},

MainMem: 5,
SwapMem: 9,

ProcCursor: 4,

Sparkline: 4,

DiskBar: 12, // base0

TempLow: 2,
TempHigh: 1,
}
27 changes: 27 additions & 0 deletions colorschemes/solarized16-light.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package colorschemes

// This scheme assumes the terminal already uses Solarized. Only DiskBar is
// different between dark/light.
var Solarized16Light = Colorscheme{
Fg: -1,
Bg: -1,

BorderLabel: -1,
BorderLine: 6,

CPULines: []int{13, 4, 6, 2, 5, 1, 9, 3},

BattLines: []int{13, 4, 6, 2, 5, 1, 9, 3},

MainMem: 5,
SwapMem: 9,

ProcCursor: 4,

Sparkline: 4,

DiskBar: 11, // base00

TempLow: 2,
TempHigh: 1,
}
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ func handleColorscheme(cs string) error {
colorscheme = colorschemes.Default
case "solarized":
colorscheme = colorschemes.Solarized
case "solarized16-light":
colorscheme = colorschemes.Solarized16Light
case "solarized16-dark":
colorscheme = colorschemes.Solarized16Dark
case "monokai":
colorscheme = colorschemes.Monokai
case "vice":
Expand Down