Clean up config loading and launch wayland
This commit is contained in:
parent
e7a8868514
commit
47b28bd335
|
@ -139,7 +139,8 @@ int handle_command(struct sway_config *config, char *exec) {
|
||||||
}
|
}
|
||||||
struct cmd_handler *handler = find_handler(handlers, sizeof(handlers) / sizeof(struct cmd_handler), cmd);
|
struct cmd_handler *handler = find_handler(handlers, sizeof(handlers) / sizeof(struct cmd_handler), cmd);
|
||||||
if (handler == NULL) {
|
if (handler == NULL) {
|
||||||
return 1;
|
fprintf(stderr, "Unknown command '%s'\n", cmd);
|
||||||
|
return 0; // TODO: return error, probably
|
||||||
}
|
}
|
||||||
int argc;
|
int argc;
|
||||||
char **argv = split_directive(exec + strlen(handler->command), &argc);
|
char **argv = split_directive(exec + strlen(handler->command), &argc);
|
||||||
|
|
|
@ -33,7 +33,7 @@ struct sway_config *read_config(FILE *file) {
|
||||||
goto _continue;
|
goto _continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!handle_command(config, line)) {
|
if (handle_command(config, line) != 0) {
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ void load_config() {
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
load_config();
|
load_config();
|
||||||
return 0;
|
|
||||||
|
|
||||||
static struct wlc_interface interface = { };
|
static struct wlc_interface interface = { };
|
||||||
if (!wlc_init(&interface, argc, argv)) {
|
if (!wlc_init(&interface, argc, argv)) {
|
||||||
|
|
Loading…
Reference in a new issue