mode can now be set in the config

This commit is contained in:
Scoopta 2019-08-17 18:40:48 -07:00
parent ad7a51a367
commit b0cfc91e0a

View File

@ -359,13 +359,11 @@ int main(int argc, char** argv) {
free(COLORS_LOCATION); 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) { if(mode != NULL) {
map_put(config, "mode", mode); 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) { if(width != NULL) {
map_put(config, "width", width); map_put(config, "width", width);