diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2019-01-14 19:39:37 -0800 |
---|---|---|
committer | Caleb Bassi <calebjbassi@gmail.com> | 2019-01-14 19:39:37 -0800 |
commit | c1d7aad1797039cd66e7ef8d3644b6981e3d63d2 (patch) | |
tree | 4d0f2fc886e598612972e6b9eb6761f6c0d5c8df | |
parent | 13b6294176f4ca9ecbe71bb54ef525c7c8611325 (diff) |
Fix custom colorscheme not loading (Close #93)
-rw-r--r-- | colorschemes/default.json | 2 | ||||
-rw-r--r-- | main.go | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/colorschemes/default.json b/colorschemes/default.json index 99abfaa..12cab1b 100644 --- a/colorschemes/default.json +++ b/colorschemes/default.json @@ -1,5 +1,5 @@ // Example json file to put in `~/.config/gotop/{name}.json` and load with -// `gotop -c {name}`. MUST DELETE THESE COMMENTS in order to load. +// `gotop -c {name}`. MUST DELETE THESE COMMENTS AND RENAME FILE in order to load. { "Fg": 7, "Bg": -1, @@ -125,10 +125,11 @@ func handleColorscheme(cs string) error { case "default-dark": colorscheme = colorschemes.DefaultDark default: - if colorscheme, err := getCustomColorscheme(cs); err != nil { - colorscheme = colorscheme + custom, err := getCustomColorscheme(cs) + if err != nil { return err } + colorscheme = custom } return nil } |