diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-29 17:02:09 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-29 17:05:04 -0500 |
commit | 4f89735fc4d33cb19d97fba253708da8dfe14210 (patch) | |
tree | 799754ced938aec650f0a1bc488be58d0c890918 /sway/config.c | |
parent | 3f950b6e526baaf719f5a7b5d7085f6468b16b29 (diff) |
Add bar config struct and defaults
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 @@ #include <stdlib.h> #include <unistd.h> #include <wordexp.h> +#include "wayland-desktop-shell-server-protocol.h" #include "readline.h" #include "stringop.h" #include "list.h" @@ -115,6 +116,18 @@ static void config_defaults(struct sway_config *config) { config->edge_gaps = true; config->gaps_inner = 0; config->gaps_outer = 0; + + // Bar + config->bar.mode = "dock"; + config->bar.hidden_state = "hide"; + config->bar.modifier = 0; + config->bar.position = DESKTOP_SHELL_PANEL_POSITION_BOTTOM; + config->bar.status_command = "while :; do date +'%Y-%m-%d %l:%M:%S %p' && sleep 1; done"; + config->bar.font = "monospace 10"; + config->bar.bar_height = -1; + config->bar.workspace_buttons = true; + config->bar.strip_workspace_numbers = false; + config->bar.binding_mode_indicator = true; } static char *get_config_path(void) { @@ -190,7 +203,7 @@ bool load_config(const char *file) { bool read_config(FILE *file, bool is_active) { struct sway_config *old_config = config; - config = malloc(sizeof(struct sway_config)); + config = calloc(1, sizeof(struct sway_config)); config_defaults(config); config->reading = true; |