mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
Try to incorporate touch in config
This commit is contained in:
parent
79f3cf88a7
commit
cb94176e27
6 changed files with 45 additions and 2 deletions
|
|
@ -8,7 +8,41 @@
|
|||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "stringop.h"
|
||||
#include <libtouch.h>
|
||||
|
||||
|
||||
void free_sway_gesture_binding(struct sway_gesture_binding *binding) {
|
||||
if(!binding) {
|
||||
return;
|
||||
}
|
||||
free(binding->command);
|
||||
free(binding);
|
||||
}
|
||||
|
||||
|
||||
struct cmd_results *cmd_touch(int argc, char **argv) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct cmd_results *cmd_gesture(int argc, char **argv) {
|
||||
return NULL;
|
||||
struct cmd_results *error = NULL;
|
||||
|
||||
struct sway_gesture_binding *binding = calloc(1, sizeof(struct sway_gesture_binding));
|
||||
if(!binding) {
|
||||
return cmd_results_new(CMD_FAILURE, "Unable to allocate binding");
|
||||
}
|
||||
|
||||
if(argc < 2) {
|
||||
free_sway_gesture_binding(binding);
|
||||
return cmd_results_new(CMD_FAILURE, "Invalid gesture command "
|
||||
"(expected at least 2 arguments, got %d)", argc);
|
||||
}
|
||||
|
||||
|
||||
binding->command = join_args(argv+1, argc -1);
|
||||
//list_t *bindings = config->current_mode->gesture_bindings;
|
||||
|
||||
|
||||
|
||||
return error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue