mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
Show swaynag on config errors
This commit is contained in:
parent
3e2bf7f3a5
commit
f9a6407111
6 changed files with 118 additions and 20 deletions
|
|
@ -308,6 +308,7 @@ enum focus_wrapping_mode {
|
|||
* The configuration struct. The result of loading a config file.
|
||||
*/
|
||||
struct sway_config {
|
||||
pid_t swaynag_pid;
|
||||
list_t *symbols;
|
||||
list_t *modes;
|
||||
list_t *bars;
|
||||
|
|
@ -403,17 +404,18 @@ struct sway_config {
|
|||
* Loads the main config from the given path. is_active should be true when
|
||||
* reloading the config.
|
||||
*/
|
||||
bool load_main_config(const char *path, bool is_active);
|
||||
bool load_main_config(const char *path, bool is_active, char **errors);
|
||||
|
||||
/**
|
||||
* Loads an included config. Can only be used after load_main_config.
|
||||
*/
|
||||
bool load_include_configs(const char *path, struct sway_config *config);
|
||||
bool load_include_configs(const char *path, struct sway_config *config,
|
||||
char **errors);
|
||||
|
||||
/**
|
||||
* Reads the config from the given FILE.
|
||||
*/
|
||||
bool read_config(FILE *file, struct sway_config *config);
|
||||
bool read_config(FILE *file, struct sway_config *config, char **errors);
|
||||
|
||||
/**
|
||||
* Free config struct
|
||||
|
|
@ -422,6 +424,8 @@ void free_config(struct sway_config *config);
|
|||
|
||||
void free_sway_variable(struct sway_variable *var);
|
||||
|
||||
void spawn_swaynag_config_errors(struct sway_config *config, char *errors);
|
||||
|
||||
/**
|
||||
* Does variable replacement for a string based on the config's currently loaded variables.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue