ipc: return all included configs in GET_CONFIG

The corresponding i3 feature[1] was added in i3 4.20.
`variable_replaced_contents` is not implemented, because Sway does
variable substitutions differently and it's much harder to obtain a copy
of the config data with substitutions.

Fixes: #5559

[1]: https://github.com/i3/i3/pull/4528
This commit is contained in:
Aleksei Bavshin 2023-12-24 20:53:51 -08:00
parent 646019cad9
commit 694165b551
No known key found for this signature in database
GPG key ID: 4F071603387A382A
6 changed files with 83 additions and 67 deletions

View file

@ -481,6 +481,11 @@ enum xwayland_mode {
XWAYLAND_MODE_IMMEDIATE,
};
struct sway_config_file {
const char *data;
const char *path;
};
/**
* The configuration struct. The result of loading a config file.
*/
@ -550,10 +555,9 @@ struct sway_config {
int gaps_inner;
struct side_gaps gaps_outer;
list_t *config_chain;
list_t *config_chain; /* list of struct sway_config_file* */
bool user_config_path;
const char *current_config_path;
const char *current_config;
struct sway_config_file *current_config;
int current_config_line_number;
char *current_config_line;