mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
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:
parent
122b96abed
commit
b2d871cfe2
12 changed files with 268 additions and 41 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#include <strings.h>
|
||||
#include "sway/tree/container.h"
|
||||
#include "sway/tree/layout.h"
|
||||
#include "sway/output.h"
|
||||
|
|
@ -37,3 +38,13 @@ struct sway_container *container_output_destroy(struct sway_container *output) {
|
|||
container_destroy(output);
|
||||
return &root_container;
|
||||
}
|
||||
|
||||
struct sway_container *output_by_name(const char *name) {
|
||||
for (int i = 0; i < root_container.children->length; ++i) {
|
||||
struct sway_container *output = root_container.children->items[i];
|
||||
if (strcasecmp(output->name, name) == 0){
|
||||
return output;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue