Added "layout promote" command.

master
wil 8 years ago
parent a0aa8d9780
commit 1b87193c3d

@ -76,7 +76,7 @@ int list_seq_find(list_t *list, int compare(const void *item, const void *data),
return -1; return -1;
} }
static void list_swap(list_t *list, int src, int dest) { void list_swap(list_t *list, int src, int dest) {
void *tmp = list->items[src]; void *tmp = list->items[src];
list->items[src] = list->items[dest]; list->items[src] = list->items[dest];
list->items[dest] = tmp; list->items[dest] = tmp;

@ -22,4 +22,6 @@ void list_qsort(list_t *list, int compare(const void *left, const void *right));
int list_seq_find(list_t *list, int compare(const void *item, const void *cmp_to), const void *cmp_to); int list_seq_find(list_t *list, int compare(const void *item, const void *cmp_to), const void *cmp_to);
// stable sort since qsort is not guaranteed to be stable // stable sort since qsort is not guaranteed to be stable
void list_stable_sort(list_t *list, int compare(const void *a, const void *b)); void list_stable_sort(list_t *list, int compare(const void *a, const void *b));
// swap two elements in a list
void list_swap(list_t *list, int src, int dest);
#endif #endif

@ -92,6 +92,9 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**(
focused container. <n> can be a positive or negative integer. These commands focused container. <n> can be a positive or negative integer. These commands
only have an effect if the focused container uses one of the "auto" layouts. only have an effect if the focused container uses one of the "auto" layouts.
**layout** promote::
Swap the focused element with the first in the one of the auto layouts.
**move** <left|right|up|down|next|prev>:: **move** <left|right|up|down|next|prev>::
Moves the focused container _left_, _right_, _up_, or _down_. Moving Moves the focused container _left_, _right_, _up_, or _down_. Moving
to _prev_ or _next_ swaps the container with its sibling in the same to _prev_ or _next_ swaps the container with its sibling in the same

Loading…
Cancel
Save