config: fix validation exit code and log level

This makes it so invalid configs will return the exit code 1 when the
validation flag is given. This also reduces the log level to SWAY_ERROR,
which makes it so only the errors are shown. If someone wants more
verbose output, the can use the -V/--verbose or -d/--debug flags.
Additionally, this also makes it so swaybg will not be spawned when
validating the config.
This commit is contained in:
Brian Ashworth 2020-02-10 21:25:07 -05:00 committed by Simon Ser
parent 31a83bd48d
commit 33a984bbc5
3 changed files with 3 additions and 3 deletions

View file

@ -315,7 +315,7 @@ int main(int argc, char **argv) {
if (debug) {
sway_log_init(SWAY_DEBUG, sway_terminate);
wlr_log_init(WLR_DEBUG, NULL);
} else if (verbose || validate) {
} else if (verbose) {
sway_log_init(SWAY_INFO, sway_terminate);
wlr_log_init(WLR_INFO, NULL);
} else {