diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-12-14 19:10:29 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-12-14 19:10:29 -0500 |
commit | 18b4959578cf96ed2eada6b3327f25b09eb1853a (patch) | |
tree | fb469ff34a1ba6c5fffc242464acd10f5235ebca /sway/commands.c | |
parent | 0b5c695d8e90db409476f83515f193d1b3f4d48a (diff) | |
parent | 0513322c033d0d2c9c7aafaa95590c4d9320fcc8 (diff) |
Merge pull request #322 from mikkeloscar/default-bar-config
Move default bar config to bar creation.
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sway/commands.c b/sway/commands.c index 053f40fc..d2499e28 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -1126,22 +1126,8 @@ static struct cmd_results *cmd_bar(int argc, char **argv) { return cmd_results_new(CMD_FAILURE, "bar", "Can only be used in config file."); } - // Create new bar from default bar config - struct bar_config *bar = NULL; - bar = malloc(sizeof*bar); - bar->mode = strdup(config->bar.mode); - bar->hidden_state = strdup(config->bar.hidden_state); - bar->modifier = config->bar.modifier; - bar->position = config->bar.position; - bar->bindings = create_list(); - bar->status_command = strdup(config->bar.status_command); - bar->font = strdup(config->bar.font); - bar->bar_height = config->bar.bar_height; - bar->workspace_buttons = config->bar.workspace_buttons; - bar->strip_workspace_numbers = config->bar.strip_workspace_numbers; - bar->binding_mode_indicator = config->bar.binding_mode_indicator; - bar->tray_padding = config->bar.tray_padding; - list_add(config->bars, bar); + // Create new bar with default values + struct bar_config *bar = default_bar_config(); // set bar id int i; |