mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Added in reload and exec_always handling
This commit is contained in:
parent
9c3a04b996
commit
c0ee2a6406
4 changed files with 63 additions and 4 deletions
|
|
@ -18,12 +18,17 @@ void config_defaults(struct sway_config *config) {
|
|||
// Flags
|
||||
config->focus_follows_mouse = true;
|
||||
config->mouse_warping = true;
|
||||
config->reloading = false;
|
||||
}
|
||||
|
||||
struct sway_config *read_config(FILE *file) {
|
||||
struct sway_config *read_config(FILE *file, bool is_active) {
|
||||
struct sway_config *config = malloc(sizeof(struct sway_config));
|
||||
config_defaults(config);
|
||||
|
||||
if (is_active) {
|
||||
config->reloading = true;
|
||||
}
|
||||
|
||||
bool success = true;
|
||||
|
||||
int temp_depth = 0; // Temporary: skip all config sections with depth
|
||||
|
|
@ -56,6 +61,8 @@ _continue:
|
|||
exit(1);
|
||||
}
|
||||
|
||||
config->reloading = false;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue