Partially implement move command

Works:

- move [container|window] to workspace <name>
    - Note, this should be able to move C_CONTAINER but this is untested
- move [workspace] to output [left|right|up|down|<name>]

Not implemented yet:

- move [left|right|up|down]
- move scratchpad
- move position
This commit is contained in:
Drew DeVault 2018-03-31 21:21:26 -04:00
parent 122b96abed
commit b2d871cfe2
12 changed files with 268 additions and 41 deletions

View file

@ -11,9 +11,6 @@ enum movement_direction {
MOVE_DOWN,
MOVE_PARENT,
MOVE_CHILD,
MOVE_NEXT,
MOVE_PREV,
MOVE_FIRST
};
struct sway_container;
@ -32,7 +29,8 @@ struct sway_root {
void layout_init(void);
void container_add_child(struct sway_container *parent, struct sway_container *child);
void container_add_child(struct sway_container *parent,
struct sway_container *child);
struct sway_container *container_add_sibling(struct sway_container *parent,
struct sway_container *child);
@ -44,7 +42,11 @@ struct sway_container *container_reap_empty(struct sway_container *container);
void container_move_to(struct sway_container* container,
struct sway_container* destination);
enum sway_container_layout container_get_default_layout(struct sway_container *output);
void container_move(struct sway_container *container,
enum movement_direction dir, int move_amt);
enum sway_container_layout container_get_default_layout(
struct sway_container *output);
void container_sort_workspaces(struct sway_container *output);