mirror of
https://github.com/swaywm/sway.git
synced 2024-12-26 23:18:26 +01:00
Clean up config loading and launch wayland
This commit is contained in:
parent
e7a8868514
commit
47b28bd335
3 changed files with 3 additions and 3 deletions
|
@ -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 a new issue