diff options
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index aa4675ce..59e6e476 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <unistd.h> | 4 | #include <unistd.h> |
5 | #include <wordexp.h> | 5 | #include <wordexp.h> |
6 | #include "wayland-desktop-shell-server-protocol.h" | ||
6 | #include "readline.h" | 7 | #include "readline.h" |
7 | #include "stringop.h" | 8 | #include "stringop.h" |
8 | #include "list.h" | 9 | #include "list.h" |
@@ -115,6 +116,18 @@ static void config_defaults(struct sway_config *config) { | |||
115 | config->edge_gaps = true; | 116 | config->edge_gaps = true; |
116 | config->gaps_inner = 0; | 117 | config->gaps_inner = 0; |
117 | config->gaps_outer = 0; | 118 | config->gaps_outer = 0; |
119 | |||
120 | // Bar | ||
121 | config->bar.mode = "dock"; | ||
122 | config->bar.hidden_state = "hide"; | ||
123 | config->bar.modifier = 0; | ||
124 | config->bar.position = DESKTOP_SHELL_PANEL_POSITION_BOTTOM; | ||
125 | config->bar.status_command = "while :; do date +'%Y-%m-%d %l:%M:%S %p' && sleep 1; done"; | ||
126 | config->bar.font = "monospace 10"; | ||
127 | config->bar.bar_height = -1; | ||
128 | config->bar.workspace_buttons = true; | ||
129 | config->bar.strip_workspace_numbers = false; | ||
130 | config->bar.binding_mode_indicator = true; | ||
118 | } | 131 | } |
119 | 132 | ||
120 | static char *get_config_path(void) { | 133 | static char *get_config_path(void) { |
@@ -190,7 +203,7 @@ bool load_config(const char *file) { | |||
190 | 203 | ||
191 | bool read_config(FILE *file, bool is_active) { | 204 | bool read_config(FILE *file, bool is_active) { |
192 | struct sway_config *old_config = config; | 205 | struct sway_config *old_config = config; |
193 | config = malloc(sizeof(struct sway_config)); | 206 | config = calloc(1, sizeof(struct sway_config)); |
194 | 207 | ||
195 | config_defaults(config); | 208 | config_defaults(config); |
196 | config->reading = true; | 209 | config->reading = true; |