action: add 'MoveToEdge'

Currently only moves view to edges of outputs

Example keybind:

<keybind key="A-Left">
  <action name="MoveToEdge">
    <direction>left</direction>
  </action>
</keybind>
This commit is contained in:
Johan Malm 2021-07-20 19:54:57 +01:00
parent 10264110f1
commit 49a73befdb
4 changed files with 57 additions and 0 deletions

View file

@ -39,6 +39,8 @@ action(struct server *server, const char *action, const char *command)
free(cmd.buf);
} else if (!strcasecmp(action, "Exit")) {
wl_display_terminate(server->wl_display);
} else if (!strcasecmp(action, "MoveToEdge")) {
view_move_to_edge(topmost_mapped_view(server), command);
} else if (!strcasecmp(action, "NextWindow")) {
server->cycle_view =
desktop_cycle_view(server, server->cycle_view);