aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-02 18:03:28 +0200
committeremersion <contact@emersion.fr>2017-10-03 08:46:10 +0200
commit517a709cddcdc5b5101cfefb7bec9d3c46ba10b0 (patch)
tree52f8e3aebbb1ae50c9899e8d9947ce0942aae302 /rootston
parent238ded1578925a1c80cba1d838ff428c25249e6a (diff)
Bind logo+q when no config file is specified
Diffstat (limited to 'rootston')
-rw-r--r--rootston/config.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/rootston/config.c b/rootston/config.c
index 1f524ab2..49bb79fb 100644
--- a/rootston/config.c
+++ b/rootston/config.c
@@ -216,14 +216,6 @@ struct roots_config *parse_args(int argc, char *argv[]) {
wl_list_init(&config->devices);
wl_list_init(&config->bindings);
- // TEMPORARY, probably
- struct binding_config *bc = calloc(1, sizeof(struct binding_config));
- wl_list_insert(&config->bindings, &bc->link);
- bc->command = strdup("exit");
- bc->keysyms_len = 1;
- bc->keysyms = calloc(1, sizeof(xkb_keysym_t));
- bc->keysyms[0] = XKB_KEY_Escape;
-
int c;
while ((c = getopt(argc, argv, "C:h")) != -1) {
switch (c) {
@@ -253,6 +245,14 @@ struct roots_config *parse_args(int argc, char *argv[]) {
if (result == -1) {
wlr_log(L_DEBUG, "No config file found. Using empty config.");
+
+ struct binding_config *bc = calloc(1, sizeof(struct binding_config));
+ wl_list_insert(&config->bindings, &bc->link);
+ bc->command = strdup("exit");
+ bc->keysyms_len = 2;
+ bc->keysyms = calloc(1, sizeof(xkb_keysym_t));
+ bc->keysyms[0] = XKB_KEY_Meta_L;
+ bc->keysyms[1] = XKB_KEY_q;
} else if (result == -2) {
wlr_log(L_ERROR, "Could not allocate memory to parse config file");
exit(1);