|
|
@ -161,6 +161,7 @@ static struct cmd_results *cmd_bindsym_or_bindcode(int argc, char **argv,
|
|
|
|
binding->type = bindcode ? BINDING_KEYCODE : BINDING_KEYSYM;
|
|
|
|
binding->type = bindcode ? BINDING_KEYCODE : BINDING_KEYSYM;
|
|
|
|
|
|
|
|
|
|
|
|
bool exclude_titlebar = false;
|
|
|
|
bool exclude_titlebar = false;
|
|
|
|
|
|
|
|
bool warn = true;
|
|
|
|
|
|
|
|
|
|
|
|
// Handle --release and --locked
|
|
|
|
// Handle --release and --locked
|
|
|
|
while (argc > 0) {
|
|
|
|
while (argc > 0) {
|
|
|
@ -178,6 +179,8 @@ static struct cmd_results *cmd_bindsym_or_bindcode(int argc, char **argv,
|
|
|
|
strlen("--input-device=")) == 0) {
|
|
|
|
strlen("--input-device=")) == 0) {
|
|
|
|
free(binding->input);
|
|
|
|
free(binding->input);
|
|
|
|
binding->input = strdup(argv[0] + strlen("--input-device="));
|
|
|
|
binding->input = strdup(argv[0] + strlen("--input-device="));
|
|
|
|
|
|
|
|
} else if (strcmp("--no-warn", argv[0]) == 0) {
|
|
|
|
|
|
|
|
warn = false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -258,9 +261,12 @@ static struct cmd_results *cmd_bindsym_or_bindcode(int argc, char **argv,
|
|
|
|
wlr_log(WLR_INFO, "Overwriting binding '%s' for device '%s' "
|
|
|
|
wlr_log(WLR_INFO, "Overwriting binding '%s' for device '%s' "
|
|
|
|
"from `%s` to `%s`", argv[0], binding->input,
|
|
|
|
"from `%s` to `%s`", argv[0], binding->input,
|
|
|
|
binding->command, config_binding->command);
|
|
|
|
binding->command, config_binding->command);
|
|
|
|
config_add_swaynag_warning("Overwriting binding '%s' for device "
|
|
|
|
if (warn) {
|
|
|
|
"'%s' to `%s` from `%s`", argv[0], binding->input,
|
|
|
|
config_add_swaynag_warning("Overwriting binding"
|
|
|
|
binding->command, config_binding->command);
|
|
|
|
"'%s' for device '%s' to `%s` from `%s`",
|
|
|
|
|
|
|
|
argv[0], binding->input, binding->command,
|
|
|
|
|
|
|
|
config_binding->command);
|
|
|
|
|
|
|
|
}
|
|
|
|
free_sway_binding(config_binding);
|
|
|
|
free_sway_binding(config_binding);
|
|
|
|
mode_bindings->items[i] = binding;
|
|
|
|
mode_bindings->items[i] = binding;
|
|
|
|
overwritten = true;
|
|
|
|
overwritten = true;
|
|
|
|