diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-08-01 23:54:40 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-08-03 10:37:35 -0400 |
commit | f9a6407111a8730df51258c3b07502814a8ab3e1 (patch) | |
tree | 6cf180159caf4a45a8f37b026b2769d24468a07b /include | |
parent | Merge pull request #2417 from marienz/swaynag-includes (diff) | |
download | sway-f9a6407111a8730df51258c3b07502814a8ab3e1.tar.gz sway-f9a6407111a8730df51258c3b07502814a8ab3e1.tar.zst sway-f9a6407111a8730df51258c3b07502814a8ab3e1.zip |
Show swaynag on config errors
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 909b6827..4fc3eadb 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -308,6 +308,7 @@ enum focus_wrapping_mode { | |||
308 | * The configuration struct. The result of loading a config file. | 308 | * The configuration struct. The result of loading a config file. |
309 | */ | 309 | */ |
310 | struct sway_config { | 310 | struct sway_config { |
311 | pid_t swaynag_pid; | ||
311 | list_t *symbols; | 312 | list_t *symbols; |
312 | list_t *modes; | 313 | list_t *modes; |
313 | list_t *bars; | 314 | list_t *bars; |
@@ -403,17 +404,18 @@ struct sway_config { | |||
403 | * Loads the main config from the given path. is_active should be true when | 404 | * Loads the main config from the given path. is_active should be true when |
404 | * reloading the config. | 405 | * reloading the config. |
405 | */ | 406 | */ |
406 | bool load_main_config(const char *path, bool is_active); | 407 | bool load_main_config(const char *path, bool is_active, char **errors); |
407 | 408 | ||
408 | /** | 409 | /** |
409 | * Loads an included config. Can only be used after load_main_config. | 410 | * Loads an included config. Can only be used after load_main_config. |
410 | */ | 411 | */ |
411 | bool load_include_configs(const char *path, struct sway_config *config); | 412 | bool load_include_configs(const char *path, struct sway_config *config, |
413 | char **errors); | ||
412 | 414 | ||
413 | /** | 415 | /** |
414 | * Reads the config from the given FILE. | 416 | * Reads the config from the given FILE. |
415 | */ | 417 | */ |
416 | bool read_config(FILE *file, struct sway_config *config); | 418 | bool read_config(FILE *file, struct sway_config *config, char **errors); |
417 | 419 | ||
418 | /** | 420 | /** |
419 | * Free config struct | 421 | * Free config struct |
@@ -422,6 +424,8 @@ void free_config(struct sway_config *config); | |||
422 | 424 | ||
423 | void free_sway_variable(struct sway_variable *var); | 425 | void free_sway_variable(struct sway_variable *var); |
424 | 426 | ||
427 | void spawn_swaynag_config_errors(struct sway_config *config, char *errors); | ||
428 | |||
425 | /** | 429 | /** |
426 | * Does variable replacement for a string based on the config's currently loaded variables. | 430 | * Does variable replacement for a string based on the config's currently loaded variables. |
427 | */ | 431 | */ |