diff options
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/sway/config.c b/sway/config.c index 2c2cc025..1302faa8 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -132,19 +132,6 @@ static void config_defaults(struct sway_config *config) { | |||
132 | config->edge_gaps = true; | 132 | config->edge_gaps = true; |
133 | config->gaps_inner = 0; | 133 | config->gaps_inner = 0; |
134 | config->gaps_outer = 0; | 134 | config->gaps_outer = 0; |
135 | |||
136 | // Bar | ||
137 | config->bar.mode = "dock"; | ||
138 | config->bar.hidden_state = "hide"; | ||
139 | config->bar.modifier = 0; | ||
140 | config->bar.position = DESKTOP_SHELL_PANEL_POSITION_BOTTOM; | ||
141 | config->bar.status_command = "while :; do date +'%Y-%m-%d %l:%M:%S %p' && sleep 1; done"; | ||
142 | config->bar.font = "monospace 10"; | ||
143 | config->bar.bar_height = -1; | ||
144 | config->bar.workspace_buttons = true; | ||
145 | config->bar.strip_workspace_numbers = false; | ||
146 | config->bar.binding_mode_indicator = true; | ||
147 | config->bar.tray_padding = 2; | ||
148 | } | 135 | } |
149 | 136 | ||
150 | static char *get_config_path(void) { | 137 | static char *get_config_path(void) { |
@@ -546,3 +533,23 @@ void free_sway_mouse_binding(struct sway_mouse_binding *binding) { | |||
546 | } | 533 | } |
547 | free(binding); | 534 | free(binding); |
548 | } | 535 | } |
536 | |||
537 | struct bar_config *default_bar_config(void) { | ||
538 | struct bar_config *bar = NULL; | ||
539 | bar = malloc(sizeof(struct bar_config)); | ||
540 | bar->mode = strdup("dock"); | ||
541 | bar->hidden_state = strdup("hide"); | ||
542 | bar->modifier = 0; | ||
543 | bar->position = DESKTOP_SHELL_PANEL_POSITION_BOTTOM; | ||
544 | bar->bindings = create_list(); | ||
545 | bar->status_command = strdup("while :; do date +'%Y-%m-%d %l:%M:%S %p' && sleep 1; done"); | ||
546 | bar->font = strdup("monospace 10"); | ||
547 | bar->bar_height = -1; | ||
548 | bar->workspace_buttons = true; | ||
549 | bar->strip_workspace_numbers = false; | ||
550 | bar->binding_mode_indicator = true; | ||
551 | bar->tray_padding = 2; | ||
552 | list_add(config->bars, bar); | ||
553 | |||
554 | return bar; | ||
555 | } | ||