mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Add minimal config subsystem
This commit is contained in:
parent
83b4c0648d
commit
90f7f1a0e6
11 changed files with 1091 additions and 19 deletions
21
sway/main.c
21
sway/main.c
|
|
@ -15,6 +15,7 @@
|
|||
#include <sys/capability.h>
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
#include "sway/config.h"
|
||||
#include "sway/server.h"
|
||||
#include "sway/layout.h"
|
||||
#include "sway/ipc-server.h"
|
||||
|
|
@ -388,14 +389,14 @@ int main(int argc, char **argv) {
|
|||
ipc_init(&server);
|
||||
log_env();
|
||||
|
||||
//if (validate) {
|
||||
// bool valid = load_main_config(config_path, false);
|
||||
// return valid ? 0 : 1;
|
||||
//}
|
||||
if (validate) {
|
||||
bool valid = load_main_config(config_path, false);
|
||||
return valid ? 0 : 1;
|
||||
}
|
||||
|
||||
//if (!load_main_config(config_path, false)) {
|
||||
// sway_terminate(EXIT_FAILURE);
|
||||
//}
|
||||
if (!load_main_config(config_path, false)) {
|
||||
sway_terminate(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (config_path) {
|
||||
free(config_path);
|
||||
|
|
@ -411,9 +412,9 @@ int main(int argc, char **argv) {
|
|||
|
||||
ipc_terminate();
|
||||
|
||||
//if (config) {
|
||||
// free_config(config);
|
||||
//}
|
||||
if (config) {
|
||||
free_config(config);
|
||||
}
|
||||
|
||||
return exit_value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue