summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaron Swab <jrswab@gmail.com>2019-10-02 22:19:29 -0400
committerJaron Swab <jrswab@gmail.com>2019-10-02 22:19:29 -0400
commit10e3b7afbc53fe68b3c9ec0dd8ddff4e15fba9e4 (patch)
tree52fb32bb3d70ef8b5fd6a416453b5b8dd538656f
parentaf4ef606d9aa7d4bb1240d6457ebf8c6eb453c5c (diff)
Added check for shell arguments
If the user enters shell arguments the config file is skipped. Also change the config.json color scheme from monokai to default.
-rw-r--r--config.json4
-rw-r--r--main.go4
2 files changed, 6 insertions, 2 deletions
diff --git a/config.json b/config.json
index 6a4a618..832e015 100644
--- a/config.json
+++ b/config.json
@@ -1,5 +1,5 @@
{
- "colorscheme": "monokai",
+ "colorscheme": "default",
"updateInterval": 1,
"minimalMode": false,
"averageLoad": false,
@@ -8,4 +8,4 @@
"battery": false,
"statusbar": false,
"netInterface": "NET_INTERFACE_ALL"
-} \ No newline at end of file
+}
diff --git a/main.go b/main.go
index cdaafdd..c113c97 100644
--- a/main.go
+++ b/main.go
@@ -140,6 +140,10 @@ Colorschemes:
// parseConfig convert the config.json and sets the appropriate variables
// for customization in place of using the terminal arguments.
func parseConfig() error {
+ // if user enters shell arguments skif the config file.
+ if len(os.Args) > 1 {
+ return nil
+ }
jsonBytes, err := ioutil.ReadFile("config.json")
if err != nil {