summaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c18
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) {
1126 return cmd_results_new(CMD_FAILURE, "bar", "Can only be used in config file."); 1126 return cmd_results_new(CMD_FAILURE, "bar", "Can only be used in config file.");
1127 } 1127 }
1128 1128
1129 // Create new bar from default bar config 1129 // Create new bar with default values
1130 struct bar_config *bar = NULL; 1130 struct bar_config *bar = default_bar_config();
1131 bar = malloc(sizeof*bar);
1132 bar->mode = strdup(config->bar.mode);
1133 bar->hidden_state = strdup(config->bar.hidden_state);
1134 bar->modifier = config->bar.modifier;
1135 bar->position = config->bar.position;
1136 bar->bindings = create_list();
1137 bar->status_command = strdup(config->bar.status_command);
1138 bar->font = strdup(config->bar.font);
1139 bar->bar_height = config->bar.bar_height;
1140 bar->workspace_buttons = config->bar.workspace_buttons;
1141 bar->strip_workspace_numbers = config->bar.strip_workspace_numbers;
1142 bar->binding_mode_indicator = config->bar.binding_mode_indicator;
1143 bar->tray_padding = config->bar.tray_padding;
1144 list_add(config->bars, bar);
1145 1131
1146 // set bar id 1132 // set bar id
1147 int i; 1133 int i;