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

Commit

Permalink
Fix custom colorscheme not loading (Close #93)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbassi committed Jan 15, 2019
1 parent 13b6294 commit c1d7aad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion colorschemes/default.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c1d7aad

Please sign in to comment.