aboutsummaryrefslogtreecommitdiff
path: root/rootston/config.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-18 22:46:52 +0200
committeremersion <contact@emersion.fr>2017-10-18 22:46:52 +0200
commitf874c3d585163f9346e81cbd45a0866fbd9c4b14 (patch)
tree09d554cba8f1bc5923a71e1e52491f46104eb614 /rootston/config.c
parenta41d45eefb754e5b9a167b96728d301546b5e19c (diff)
Add a default meta key
Diffstat (limited to 'rootston/config.c')
-rw-r--r--rootston/config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/rootston/config.c b/rootston/config.c
index 5e911e39..5ed299a7 100644
--- a/rootston/config.c
+++ b/rootston/config.c
@@ -263,6 +263,10 @@ static int config_ini_handler(void *user, const char *section, const char *name,
struct roots_config *parse_args(int argc, char *argv[]) {
struct roots_config *config = calloc(1, sizeof(struct roots_config));
+ if (config == NULL) {
+ return NULL;
+ }
+
config->xwayland = true;
wl_list_init(&config->outputs);
wl_list_init(&config->devices);
@@ -296,7 +300,8 @@ struct roots_config *parse_args(int argc, char *argv[]) {
int result = ini_parse(config->config_path, config_ini_handler, config);
if (result == -1) {
- wlr_log(L_DEBUG, "No config file found. Using empty config.");
+ wlr_log(L_DEBUG, "No config file found. Using sensible defaults.");
+ config->keyboard.meta_key = WLR_MODIFIER_LOGO;
add_binding_config(&config->bindings, "Logo+Shift+e", "exit");
add_binding_config(&config->bindings, "Ctrl+q", "close");
add_binding_config(&config->bindings, "Alt+Tab", "next_window");