aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-18 16:47:57 -0400
committerGitHub <noreply@github.com>2017-10-18 16:47:57 -0400
commit0536ea3c47fbfcc68fc28e09d745872564b30343 (patch)
tree09d554cba8f1bc5923a71e1e52491f46104eb614 /rootston
parenta41d45eefb754e5b9a167b96728d301546b5e19c (diff)
parentf874c3d585163f9346e81cbd45a0866fbd9c4b14 (diff)
Merge pull request #289 from emersion/default-meta-key
rootston: add a default meta key if no config file is specified
Diffstat (limited to 'rootston')
-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");