aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/input
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/input')
-rw-r--r--sway/commands/input/accel_profile.c7
-rw-r--r--sway/commands/input/click_method.c7
-rw-r--r--sway/commands/input/drag.c5
-rw-r--r--sway/commands/input/drag_lock.c5
-rw-r--r--sway/commands/input/dwt.c4
-rw-r--r--sway/commands/input/events.c9
-rw-r--r--sway/commands/input/left_handed.c5
-rw-r--r--sway/commands/input/map_from_region.c16
-rw-r--r--sway/commands/input/map_to_output.c5
-rw-r--r--sway/commands/input/middle_emulation.c5
-rw-r--r--sway/commands/input/natural_scroll.c5
-rw-r--r--sway/commands/input/pointer_accel.c10
-rw-r--r--sway/commands/input/repeat_delay.c8
-rw-r--r--sway/commands/input/repeat_rate.c8
-rw-r--r--sway/commands/input/scroll_button.c14
-rw-r--r--sway/commands/input/scroll_factor.c9
-rw-r--r--sway/commands/input/scroll_method.c7
-rw-r--r--sway/commands/input/tap.c4
-rw-r--r--sway/commands/input/tap_button_map.c7
-rw-r--r--sway/commands/input/xkb_capslock.c5
-rw-r--r--sway/commands/input/xkb_layout.c5
-rw-r--r--sway/commands/input/xkb_model.c5
-rw-r--r--sway/commands/input/xkb_numlock.c5
-rw-r--r--sway/commands/input/xkb_options.c5
-rw-r--r--sway/commands/input/xkb_rules.c5
-rw-r--r--sway/commands/input/xkb_variant.c5
26 files changed, 72 insertions, 103 deletions
diff --git a/sway/commands/input/accel_profile.c b/sway/commands/input/accel_profile.c
index f7016790..08f324cc 100644
--- a/sway/commands/input/accel_profile.c
+++ b/sway/commands/input/accel_profile.c
@@ -11,8 +11,7 @@ struct cmd_results *input_cmd_accel_profile(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "accel_profile",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (strcasecmp(argv[0], "adaptive") == 0) {
@@ -20,9 +19,9 @@ struct cmd_results *input_cmd_accel_profile(int argc, char **argv) {
} else if (strcasecmp(argv[0], "flat") == 0) {
ic->accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT;
} else {
- return cmd_results_new(CMD_INVALID, "accel_profile",
+ return cmd_results_new(CMD_INVALID,
"Expected 'accel_profile <adaptive|flat>'");
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/click_method.c b/sway/commands/input/click_method.c
index 24777475..03fcb458 100644
--- a/sway/commands/input/click_method.c
+++ b/sway/commands/input/click_method.c
@@ -12,8 +12,7 @@ struct cmd_results *input_cmd_click_method(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "click_method",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (strcasecmp(argv[0], "none") == 0) {
@@ -23,9 +22,9 @@ struct cmd_results *input_cmd_click_method(int argc, char **argv) {
} else if (strcasecmp(argv[0], "clickfinger") == 0) {
ic->click_method = LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
} else {
- return cmd_results_new(CMD_INVALID, "click_method",
+ return cmd_results_new(CMD_INVALID,
"Expected 'click_method <none|button_areas|clickfinger'>");
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/drag.c b/sway/commands/input/drag.c
index e325df29..062357d4 100644
--- a/sway/commands/input/drag.c
+++ b/sway/commands/input/drag.c
@@ -12,8 +12,7 @@ struct cmd_results *input_cmd_drag(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE,
- "drag", "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (parse_boolean(argv[0], true)) {
@@ -22,5 +21,5 @@ struct cmd_results *input_cmd_drag(int argc, char **argv) {
ic->drag = LIBINPUT_CONFIG_DRAG_DISABLED;
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/drag_lock.c b/sway/commands/input/drag_lock.c
index db5d5afa..24c548e2 100644
--- a/sway/commands/input/drag_lock.c
+++ b/sway/commands/input/drag_lock.c
@@ -12,8 +12,7 @@ struct cmd_results *input_cmd_drag_lock(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE,
- "drag_lock", "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (parse_boolean(argv[0], true)) {
@@ -22,5 +21,5 @@ struct cmd_results *input_cmd_drag_lock(int argc, char **argv) {
ic->drag_lock = LIBINPUT_CONFIG_DRAG_LOCK_DISABLED;
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/dwt.c b/sway/commands/input/dwt.c
index 0c3881dd..a7a4e494 100644
--- a/sway/commands/input/dwt.c
+++ b/sway/commands/input/dwt.c
@@ -12,7 +12,7 @@ struct cmd_results *input_cmd_dwt(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "dwt", "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (parse_boolean(argv[0], true)) {
@@ -21,5 +21,5 @@ struct cmd_results *input_cmd_dwt(int argc, char **argv) {
ic->dwt = LIBINPUT_CONFIG_DWT_DISABLED;
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/events.c b/sway/commands/input/events.c
index 69f46269..2c6505d8 100644
--- a/sway/commands/input/events.c
+++ b/sway/commands/input/events.c
@@ -71,8 +71,7 @@ struct cmd_results *input_cmd_events(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "events",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (strcasecmp(argv[0], "enabled") == 0) {
@@ -83,7 +82,7 @@ struct cmd_results *input_cmd_events(int argc, char **argv) {
ic->send_events =
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE;
} else if (config->reading) {
- return cmd_results_new(CMD_INVALID, "events",
+ return cmd_results_new(CMD_INVALID,
"Expected 'events <enabled|disabled|disabled_on_external_mouse>'");
} else if (strcasecmp(argv[0], "toggle") == 0) {
if (strcmp(ic->identifier, "*") == 0) {
@@ -97,10 +96,10 @@ struct cmd_results *input_cmd_events(int argc, char **argv) {
toggle_send_events(ic);
}
} else {
- return cmd_results_new(CMD_INVALID, "events",
+ return cmd_results_new(CMD_INVALID,
"Expected 'events <enabled|disabled|disabled_on_external_mouse|"
"toggle>'");
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/left_handed.c b/sway/commands/input/left_handed.c
index 2e0f757b..93d8d56d 100644
--- a/sway/commands/input/left_handed.c
+++ b/sway/commands/input/left_handed.c
@@ -12,11 +12,10 @@ struct cmd_results *input_cmd_left_handed(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "left_handed",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->left_handed = parse_boolean(argv[0], true);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/map_from_region.c b/sway/commands/input/map_from_region.c
index 53608a67..de00b714 100644
--- a/sway/commands/input/map_from_region.c
+++ b/sway/commands/input/map_from_region.c
@@ -40,8 +40,7 @@ struct cmd_results *input_cmd_map_from_region(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "map_from_region",
- "No input device defined");
+ return cmd_results_new(CMD_FAILURE, "No input device defined");
}
ic->mapped_from_region =
@@ -52,30 +51,27 @@ struct cmd_results *input_cmd_map_from_region(int argc, char **argv) {
&ic->mapped_from_region->y1, &mm1)) {
free(ic->mapped_from_region);
ic->mapped_from_region = NULL;
- return cmd_results_new(CMD_FAILURE, "map_from_region",
- "Invalid top-left coordinates");
+ return cmd_results_new(CMD_FAILURE, "Invalid top-left coordinates");
}
if (!parse_coords(argv[1], &ic->mapped_from_region->x2,
&ic->mapped_from_region->y2, &mm2)) {
free(ic->mapped_from_region);
ic->mapped_from_region = NULL;
- return cmd_results_new(CMD_FAILURE, "map_from_region",
- "Invalid bottom-right coordinates");
+ return cmd_results_new(CMD_FAILURE, "Invalid bottom-right coordinates");
}
if (ic->mapped_from_region->x1 > ic->mapped_from_region->x2 ||
ic->mapped_from_region->y1 > ic->mapped_from_region->y2) {
free(ic->mapped_from_region);
ic->mapped_from_region = NULL;
- return cmd_results_new(CMD_FAILURE, "map_from_region",
- "Invalid rectangle");
+ return cmd_results_new(CMD_FAILURE, "Invalid rectangle");
}
if (mm1 != mm2) {
free(ic->mapped_from_region);
ic->mapped_from_region = NULL;
- return cmd_results_new(CMD_FAILURE, "map_from_region",
+ return cmd_results_new(CMD_FAILURE,
"Both coordinates must be in the same unit");
}
ic->mapped_from_region->mm = mm1;
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/map_to_output.c b/sway/commands/input/map_to_output.c
index 8b16c557..6d623186 100644
--- a/sway/commands/input/map_to_output.c
+++ b/sway/commands/input/map_to_output.c
@@ -13,11 +13,10 @@ struct cmd_results *input_cmd_map_to_output(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "map_to_output",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->mapped_to_output = strdup(argv[0]);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/middle_emulation.c b/sway/commands/input/middle_emulation.c
index 80d26838..9f32692e 100644
--- a/sway/commands/input/middle_emulation.c
+++ b/sway/commands/input/middle_emulation.c
@@ -12,8 +12,7 @@ struct cmd_results *input_cmd_middle_emulation(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "middle_emulation",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (parse_boolean(argv[0], true)) {
@@ -22,5 +21,5 @@ struct cmd_results *input_cmd_middle_emulation(int argc, char **argv) {
ic->middle_emulation = LIBINPUT_CONFIG_MIDDLE_EMULATION_DISABLED;
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/natural_scroll.c b/sway/commands/input/natural_scroll.c
index e2a93500..dec32a5b 100644
--- a/sway/commands/input/natural_scroll.c
+++ b/sway/commands/input/natural_scroll.c
@@ -12,11 +12,10 @@ struct cmd_results *input_cmd_natural_scroll(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "natural_scoll",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->natural_scroll = parse_boolean(argv[0], true);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/pointer_accel.c b/sway/commands/input/pointer_accel.c
index efd81ee6..e214b32f 100644
--- a/sway/commands/input/pointer_accel.c
+++ b/sway/commands/input/pointer_accel.c
@@ -13,19 +13,17 @@ struct cmd_results *input_cmd_pointer_accel(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE,
- "pointer_accel", "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
float pointer_accel = parse_float(argv[0]);
if (isnan(pointer_accel)) {
- return cmd_results_new(CMD_INVALID, "pointer_accel",
+ return cmd_results_new(CMD_INVALID,
"Invalid pointer accel; expected float.");
} if (pointer_accel < -1 || pointer_accel > 1) {
- return cmd_results_new(CMD_INVALID, "pointer_accel",
- "Input out of range [-1, 1]");
+ return cmd_results_new(CMD_INVALID, "Input out of range [-1, 1]");
}
ic->pointer_accel = pointer_accel;
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/repeat_delay.c b/sway/commands/input/repeat_delay.c
index d94b3e4d..5b787fe6 100644
--- a/sway/commands/input/repeat_delay.c
+++ b/sway/commands/input/repeat_delay.c
@@ -11,16 +11,14 @@ struct cmd_results *input_cmd_repeat_delay(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE,
- "repeat_delay", "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
int repeat_delay = atoi(argv[0]);
if (repeat_delay < 0) {
- return cmd_results_new(CMD_INVALID, "repeat_delay",
- "Repeat delay cannot be negative");
+ return cmd_results_new(CMD_INVALID, "Repeat delay cannot be negative");
}
ic->repeat_delay = repeat_delay;
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/repeat_rate.c b/sway/commands/input/repeat_rate.c
index ebec4cdb..79c5efe2 100644
--- a/sway/commands/input/repeat_rate.c
+++ b/sway/commands/input/repeat_rate.c
@@ -11,16 +11,14 @@ struct cmd_results *input_cmd_repeat_rate(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE,
- "repeat_rate", "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
int repeat_rate = atoi(argv[0]);
if (repeat_rate < 0) {
- return cmd_results_new(CMD_INVALID, "repeat_rate",
- "Repeat rate cannot be negative");
+ return cmd_results_new(CMD_INVALID, "Repeat rate cannot be negative");
}
ic->repeat_rate = repeat_rate;
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/scroll_button.c b/sway/commands/input/scroll_button.c
index d82a1fe1..6b331419 100644
--- a/sway/commands/input/scroll_button.c
+++ b/sway/commands/input/scroll_button.c
@@ -10,30 +10,28 @@ struct cmd_results *input_cmd_scroll_button(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "scroll_button",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (strcmp(*argv, "disable") == 0) {
ic->scroll_button = 0;
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
char *message = NULL;
uint32_t button = get_mouse_button(*argv, &message);
if (message) {
- error = cmd_results_new(CMD_INVALID, "scroll_button", message);
+ error = cmd_results_new(CMD_INVALID, message);
free(message);
return error;
} else if (button == SWAY_SCROLL_UP || button == SWAY_SCROLL_DOWN
|| button == SWAY_SCROLL_LEFT || button == SWAY_SCROLL_RIGHT) {
- return cmd_results_new(CMD_INVALID, "scroll_button",
+ return cmd_results_new(CMD_INVALID,
"X11 axis buttons are not supported for scroll_button");
} else if (!button) {
- return cmd_results_new(CMD_INVALID, "scroll_button",
- "Unknown button %s", *argv);
+ return cmd_results_new(CMD_INVALID, "Unknown button %s", *argv);
}
ic->scroll_button = button;
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/scroll_factor.c b/sway/commands/input/scroll_factor.c
index 52d943b0..4b72b6fa 100644
--- a/sway/commands/input/scroll_factor.c
+++ b/sway/commands/input/scroll_factor.c
@@ -14,19 +14,18 @@ struct cmd_results *input_cmd_scroll_factor(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE,
- "scroll_factor", "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
float scroll_factor = parse_float(argv[0]);
if (isnan(scroll_factor)) {
- return cmd_results_new(CMD_INVALID, "scroll_factor",
+ return cmd_results_new(CMD_INVALID,
"Invalid scroll factor; expected float.");
} else if (scroll_factor < 0) {
- return cmd_results_new(CMD_INVALID, "scroll_factor",
+ return cmd_results_new(CMD_INVALID,
"Scroll factor cannot be negative.");
}
ic->scroll_factor = scroll_factor;
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/scroll_method.c b/sway/commands/input/scroll_method.c
index c116b052..cd8b5f7a 100644
--- a/sway/commands/input/scroll_method.c
+++ b/sway/commands/input/scroll_method.c
@@ -11,8 +11,7 @@ struct cmd_results *input_cmd_scroll_method(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "scroll_method",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (strcasecmp(argv[0], "none") == 0) {
@@ -24,9 +23,9 @@ struct cmd_results *input_cmd_scroll_method(int argc, char **argv) {
} else if (strcasecmp(argv[0], "on_button_down") == 0) {
ic->scroll_method = LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN;
} else {
- return cmd_results_new(CMD_INVALID, "scroll_method",
+ return cmd_results_new(CMD_INVALID,
"Expected 'scroll_method <none|two_finger|edge|on_button_down>'");
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/tap.c b/sway/commands/input/tap.c
index c455b696..443fd49d 100644
--- a/sway/commands/input/tap.c
+++ b/sway/commands/input/tap.c
@@ -13,7 +13,7 @@ struct cmd_results *input_cmd_tap(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "tap", "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (parse_boolean(argv[0], true)) {
@@ -22,5 +22,5 @@ struct cmd_results *input_cmd_tap(int argc, char **argv) {
ic->tap = LIBINPUT_CONFIG_TAP_DISABLED;
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/tap_button_map.c b/sway/commands/input/tap_button_map.c
index dff2985b..77ac6de7 100644
--- a/sway/commands/input/tap_button_map.c
+++ b/sway/commands/input/tap_button_map.c
@@ -11,8 +11,7 @@ struct cmd_results *input_cmd_tap_button_map(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "tap_button_map",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
if (strcasecmp(argv[0], "lrm") == 0) {
@@ -20,9 +19,9 @@ struct cmd_results *input_cmd_tap_button_map(int argc, char **argv) {
} else if (strcasecmp(argv[0], "lmr") == 0) {
ic->tap_button_map = LIBINPUT_CONFIG_TAP_MAP_LMR;
} else {
- return cmd_results_new(CMD_INVALID, "tap_button_map",
+ return cmd_results_new(CMD_INVALID,
"Expected 'tap_button_map <lrm|lmr>'");
}
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/xkb_capslock.c b/sway/commands/input/xkb_capslock.c
index a939c72f..7ce98ebb 100644
--- a/sway/commands/input/xkb_capslock.c
+++ b/sway/commands/input/xkb_capslock.c
@@ -12,11 +12,10 @@ struct cmd_results *input_cmd_xkb_capslock(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "xkb_capslock",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->xkb_capslock = parse_boolean(argv[0], false);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/xkb_layout.c b/sway/commands/input/xkb_layout.c
index 43166401..c9200aa2 100644
--- a/sway/commands/input/xkb_layout.c
+++ b/sway/commands/input/xkb_layout.c
@@ -11,13 +11,12 @@ struct cmd_results *input_cmd_xkb_layout(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "xkb_layout",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->xkb_layout = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_layout for config: %s layout: %s",
ic->identifier, ic->xkb_layout);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/xkb_model.c b/sway/commands/input/xkb_model.c
index 066f632b..763ae80e 100644
--- a/sway/commands/input/xkb_model.c
+++ b/sway/commands/input/xkb_model.c
@@ -11,13 +11,12 @@ struct cmd_results *input_cmd_xkb_model(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "xkb_model",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->xkb_model = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_model for config: %s model: %s",
ic->identifier, ic->xkb_model);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/xkb_numlock.c b/sway/commands/input/xkb_numlock.c
index 2e962c5b..d5b75672 100644
--- a/sway/commands/input/xkb_numlock.c
+++ b/sway/commands/input/xkb_numlock.c
@@ -12,11 +12,10 @@ struct cmd_results *input_cmd_xkb_numlock(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "xkb_numlock",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->xkb_numlock = parse_boolean(argv[0], false);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/xkb_options.c b/sway/commands/input/xkb_options.c
index 09dc4a5c..1ff6e680 100644
--- a/sway/commands/input/xkb_options.c
+++ b/sway/commands/input/xkb_options.c
@@ -11,13 +11,12 @@ struct cmd_results *input_cmd_xkb_options(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "xkb_options",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->xkb_options = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_options for config: %s options: %s",
ic->identifier, ic->xkb_options);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/xkb_rules.c b/sway/commands/input/xkb_rules.c
index d3e576e6..29172b24 100644
--- a/sway/commands/input/xkb_rules.c
+++ b/sway/commands/input/xkb_rules.c
@@ -11,13 +11,12 @@ struct cmd_results *input_cmd_xkb_rules(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "xkb_rules",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->xkb_rules = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_rules for config: %s rules: %s",
ic->identifier, ic->xkb_rules);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}
diff --git a/sway/commands/input/xkb_variant.c b/sway/commands/input/xkb_variant.c
index 2d7581d1..9f3baed6 100644
--- a/sway/commands/input/xkb_variant.c
+++ b/sway/commands/input/xkb_variant.c
@@ -11,13 +11,12 @@ struct cmd_results *input_cmd_xkb_variant(int argc, char **argv) {
}
struct input_config *ic = config->handler_context.input_config;
if (!ic) {
- return cmd_results_new(CMD_FAILURE, "xkb_variant",
- "No input device defined.");
+ return cmd_results_new(CMD_FAILURE, "No input device defined.");
}
ic->xkb_variant = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_variant for config: %s variant: %s",
ic->identifier, ic->xkb_variant);
- return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+ return cmd_results_new(CMD_SUCCESS, NULL);
}