diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-18 11:22:02 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-18 11:22:02 -0500 |
commit | 733993a651c71f7e2198d505960d6bbd31e0e107 (patch) | |
tree | e51732c5872b624e73355f9e5b3f762101f3cd0d /sway/commands/input/accel_profile.c | |
parent | Initial (awful) pass on xdg shell support (diff) | |
download | sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.gz sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.zst sway-733993a651c71f7e2198d505960d6bbd31e0e107.zip |
Move everything to sway/old/
Diffstat (limited to 'sway/commands/input/accel_profile.c')
-rw-r--r-- | sway/commands/input/accel_profile.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/sway/commands/input/accel_profile.c b/sway/commands/input/accel_profile.c deleted file mode 100644 index 8288c1ad..00000000 --- a/sway/commands/input/accel_profile.c +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | #include <string.h> | ||
2 | #include <strings.h> | ||
3 | #include "sway/commands.h" | ||
4 | #include "sway/input.h" | ||
5 | |||
6 | struct cmd_results *input_cmd_accel_profile(int argc, char **argv) { | ||
7 | struct cmd_results *error = NULL; | ||
8 | if ((error = checkarg(argc, "accel_profile", EXPECTED_AT_LEAST, 1))) { | ||
9 | return error; | ||
10 | } | ||
11 | if (!current_input_config) { | ||
12 | return cmd_results_new(CMD_FAILURE, "accel_profile", "No input device defined."); | ||
13 | } | ||
14 | struct input_config *new_config = new_input_config(current_input_config->identifier); | ||
15 | |||
16 | if (strcasecmp(argv[0], "adaptive") == 0) { | ||
17 | new_config->accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE; | ||
18 | } else if (strcasecmp(argv[0], "flat") == 0) { | ||
19 | new_config->accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT; | ||
20 | } else { | ||
21 | return cmd_results_new(CMD_INVALID, "accel_profile", | ||
22 | "Expected 'accel_profile <adaptive|flat>'"); | ||
23 | } | ||
24 | |||
25 | input_cmd_apply(new_config); | ||
26 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | ||
27 | } | ||