summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar wil <william.barsse@gmail.com>2016-12-29 20:30:32 +0100
committerLibravatar wil <william.barsse@gmail.com>2016-12-29 20:31:30 +0100
commit1b87193c3d63c8d884b5a45451a000d9b930521e (patch)
treeed5797d8f716066f819ed2d81832a4d038b6b6c2
parentcleanup in auto layouts (diff)
downloadsway-1b87193c3d63c8d884b5a45451a000d9b930521e.tar.gz
sway-1b87193c3d63c8d884b5a45451a000d9b930521e.tar.zst
sway-1b87193c3d63c8d884b5a45451a000d9b930521e.zip
Added "layout promote" command.
-rw-r--r--common/list.c2
-rw-r--r--include/list.h2
-rw-r--r--sway/sway.5.txt3
3 files changed, 6 insertions, 1 deletions
diff --git a/common/list.c b/common/list.c
index dd864a9b..39cc10e1 100644
--- a/common/list.c
+++ b/common/list.c
@@ -76,7 +76,7 @@ int list_seq_find(list_t *list, int compare(const void *item, const void *data),
76 return -1; 76 return -1;
77} 77}
78 78
79static void list_swap(list_t *list, int src, int dest) { 79void list_swap(list_t *list, int src, int dest) {
80 void *tmp = list->items[src]; 80 void *tmp = list->items[src];
81 list->items[src] = list->items[dest]; 81 list->items[src] = list->items[dest];
82 list->items[dest] = tmp; 82 list->items[dest] = tmp;
diff --git a/include/list.h b/include/list.h
index f478b6bb..7eead4ac 100644
--- a/include/list.h
+++ b/include/list.h
@@ -22,4 +22,6 @@ void list_qsort(list_t *list, int compare(const void *left, const void *right));
22int list_seq_find(list_t *list, int compare(const void *item, const void *cmp_to), const void *cmp_to); 22int list_seq_find(list_t *list, int compare(const void *item, const void *cmp_to), const void *cmp_to);
23// stable sort since qsort is not guaranteed to be stable 23// stable sort since qsort is not guaranteed to be stable
24void list_stable_sort(list_t *list, int compare(const void *a, const void *b)); 24void list_stable_sort(list_t *list, int compare(const void *a, const void *b));
25// swap two elements in a list
26void list_swap(list_t *list, int src, int dest);
25#endif 27#endif
diff --git a/sway/sway.5.txt b/sway/sway.5.txt
index c0c4bfb2..b58fbe55 100644
--- a/sway/sway.5.txt
+++ b/sway/sway.5.txt
@@ -92,6 +92,9 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**(
92 focused container. <n> can be a positive or negative integer. These commands 92 focused container. <n> can be a positive or negative integer. These commands
93 only have an effect if the focused container uses one of the "auto" layouts. 93 only have an effect if the focused container uses one of the "auto" layouts.
94 94
95**layout** promote::
96 Swap the focused element with the first in the one of the auto layouts.
97
95**move** <left|right|up|down|next|prev>:: 98**move** <left|right|up|down|next|prev>::
96 Moves the focused container _left_, _right_, _up_, or _down_. Moving 99 Moves the focused container _left_, _right_, _up_, or _down_. Moving
97 to _prev_ or _next_ swaps the container with its sibling in the same 100 to _prev_ or _next_ swaps the container with its sibling in the same