Closes #1291.
'*'{-n,--to-node}'[Transplant the selected node to the given node]:node selector:_bspc_selector -- node'\
'*'{-o,--presel-ratio}'[Set the splitting ratio of the preselection area]:preselect ratio: ( )'\
'*'{-p,--presel-dir}'[Preselect the splitting area of the selected node or cancel the preselection]: :_bspc_prefix -- "~" preselect presel_dir'\
+ '*'{-y,--type}'[Set the splitting type of the selected node]: :(horizontal vertical)'\
'*'{-r,--ratio}'[Set the splitting ratio of the selected node (0 < ratio < 1)]: :( )'\
'*'{-R,--rotate}'[Rotate the tree rooted at the selected node]:angle:(90 270 180)'\
'*'{-s,--swap}'[Swap the selected node with the given node]:node selector:_bspc_selector -- node'\
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 05/28/2021
+.\" Date: 06/01/2021
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.10-26-gbadfd6c
+.\" Source: Bspwm 0.9.10-31-ge21ab5b
.\" Language: English
.\"
-.TH "BSPWM" "1" "05/28/2021" "Bspwm 0\&.9\&.10\-26\-gbadfd6c" "Bspwm Manual"
+.TH "BSPWM" "1" "06/01/2021" "Bspwm 0\&.9\&.10\-31\-ge21ab5b" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
pixels vertically\&.
.RE
.PP
+\fB\-y\fR, \fB\-\-type\fR \fIhorizontal|vertical\fR
+.RS 4
+Set the splitting type of the selected node\&.
+.RE
+.PP
\fB\-r\fR, \fB\-\-ratio\fR \fIRATIO\fR|(+|\-)(\fIPIXELS\fR|\fIFRACTION\fR)
.RS 4
Set the splitting ratio of the selected node (0 <
*-z*, *--resize* top|left|bottom|right|top_left|top_right|bottom_right|bottom_left 'dx' 'dy'::
Resize the selected window by moving the given handle by 'dx' pixels horizontally and 'dy' pixels vertically.
+*-y*, *--type* 'horizontal|vertical'::
+ Set the splitting type of the selected node.
+
*-r*, *--ratio* 'RATIO'|(+|-)('PIXELS'|'FRACTION')::
Set the splitting ratio of the selected node (0 < 'RATIO' < 1).
fail(rsp, "node %s: Invalid resize handle argument: '%s'.\n", *(args - 1), *args);
break;
}
+ } else if (streq("-y", *args) || streq("--type", *args)) {
+ num--, args++;
+ if (num < 1) {
+ fail(rsp, "node %s: Not enough arguments.\n", *(args - 1));
+ break;
+ }
+ if (trg.node == NULL) {
+ fail(rsp, "");
+ break;
+ }
+ split_type_t typ;
+ if (parse_split_type(*args, &typ)) {
+ set_type(trg.node, typ);
+ changed = true;
+ } else {
+ fail(rsp, "");
+ break;
+ }
} else if (streq("-r", *args) || streq("--ratio", *args)) {
num--, args++;
if (num < 1) {
return p;
}
+void set_type(node_t *n, split_type_t typ)
+{
+ if (n == NULL) {
+ return;
+ }
+
+ n->split_type = typ;
+ update_constraints(n);
+ rebuild_constraints_towards_root(n);
+}
+
void set_ratio(node_t *n, double rat)
{
if (n == NULL) {
void arrange(monitor_t *m, desktop_t *d);
void apply_layout(monitor_t *m, desktop_t *d, node_t *n, xcb_rectangle_t rect, xcb_rectangle_t root_rect);
presel_t *make_presel(void);
+void set_type(node_t *n, split_type_t typ);
void set_ratio(node_t *n, double rat);
void presel_dir(monitor_t *m, desktop_t *d, node_t *n, direction_t dir);
void presel_ratio(monitor_t *m, desktop_t *d, node_t *n, double ratio);