From c01b89839874239bee7948fad004b19a19917432 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 1 Jan 2017 12:36:47 -0500 Subject: [PATCH 1/2] Fix inline is_auto_layout --- include/sway/layout.h | 5 ++--- sway/layout.c | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/sway/layout.h b/include/sway/layout.h index a771a72e..d7fe748d 100644 --- a/include/sway/layout.h +++ b/include/sway/layout.h @@ -75,7 +75,6 @@ void swayc_log(log_importance_t verbosity, swayc_t *cont, const char* format, .. */ enum swayc_layouts default_layout(swayc_t *output); -inline bool is_auto_layout(enum swayc_layouts layout) { - return (layout >= L_AUTO_FIRST) && (layout <= L_AUTO_LAST); -} +bool is_auto_layout(enum swayc_layouts layout); + #endif diff --git a/sway/layout.c b/sway/layout.c index 2de6da45..2195863e 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -1487,3 +1487,7 @@ enum swayc_layouts default_layout(swayc_t *output) { return L_VERT; } } + +bool is_auto_layout(enum swayc_layouts layout) { + return (layout >= L_AUTO_FIRST) && (layout <= L_AUTO_LAST); +} From 0412e95ba99581a32513eb241e6ac2c4e4ed03dc Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 1 Jan 2017 12:41:52 -0500 Subject: [PATCH 2/2] Document new layout command syntax And an old one that the docs overlooked --- sway/sway.5.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sway/sway.5.txt b/sway/sway.5.txt index b58fbe55..87b02f9f 100644 --- a/sway/sway.5.txt +++ b/sway/sway.5.txt @@ -87,11 +87,17 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**( _splitv_, _toggle split_, _stacking_, _tabbed_, _auto_left_, _auto_right_, _auto_top, _auto_bottom_. +**layout** auto :: + Cycles between available auto layouts. + **layout** :: Modify the number of master elements, respectively slave columns, in the focused container. can be a positive or negative integer. These commands only have an effect if the focused container uses one of the "auto" layouts. +**layout** toggle split:: + Cycles between available split layouts. + **layout** promote:: Swap the focused element with the first in the one of the auto layouts.