mirror of
https://github.com/swaywm/sway
synced 2024-11-18 00:24:17 +01:00
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);
|
||||
if (handler == NULL) {
|
||||
return 1;
|
||||
fprintf(stderr, "Unknown command '%s'\n", cmd);
|
||||
return 0; // TODO: return error, probably
|
||||
}
|
||||
int argc;
|
||||
char **argv = split_directive(exec + strlen(handler->command), &argc);
|
||||
|
@ -33,7 +33,7 @@ struct sway_config *read_config(FILE *file) {
|
||||
goto _continue;
|
||||
}
|
||||
|
||||
if (!handle_command(config, line)) {
|
||||
if (handle_command(config, line) != 0) {
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ void load_config() {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
load_config();
|
||||
return 0;
|
||||
|
||||
static struct wlc_interface interface = { };
|
||||
if (!wlc_init(&interface, argc, argv)) {
|
||||
|
Loading…
Reference in New Issue
Block a user