From b0cfc91e0ad8a17c26d110293c2b49c67aa342a0 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Sat, 17 Aug 2019 18:40:48 -0700 Subject: [PATCH] mode can now be set in the config --- src/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 4c67f0f..cab9d45 100644 --- a/src/main.c +++ b/src/main.c @@ -359,13 +359,11 @@ int main(int argc, char** argv) { free(COLORS_LOCATION); - if(mode == NULL) { - fprintf(stderr, "I need a mode, please give me a mode, that's what --show is for\n"); - exit(1); - } - if(mode != NULL) { map_put(config, "mode", mode); + } else if(map_get(config, "mode") == NULL) { + fprintf(stderr, "I need a mode, please give me a mode, that's what --show is for\n"); + exit(1); } if(width != NULL) { map_put(config, "width", width);