.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 12/21/2016
+.\" Date: 01/30/2017
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.2-18-g0d34170
+.\" Source: Bspwm 0.9.2-25-g048230e
.\" Language: English
.\"
-.TH "BSPWM" "1" "12/21/2016" "Bspwm 0\&.9\&.2\-18\-g0d34170" "Bspwm Manual"
+.TH "BSPWM" "1" "01/30/2017" "Bspwm 0\&.9\&.2\-25\-g048230e" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
pixels vertically\&.
.RE
.PP
-\fB\-r\fR, \fB\-\-ratio\fR \fIRATIO\fR|(+|\-)\fIPIXELS\fR
+\fB\-r\fR, \fB\-\-ratio\fR \fIRATIO\fR|(+|\-)(\fIPIXELS\fR|\fIFRACTION\fR)
.RS 4
Set the splitting ratio of the selected node (0 <
\fIRATIO\fR
*-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.
-*-r*, *--ratio* 'RATIO'|(+|-)'PIXELS'::
+*-r*, *--ratio* 'RATIO'|(+|-)('PIXELS'|'FRACTION')::
Set the splitting ratio of the selected node (0 < 'RATIO' < 1).
*-R*, *--rotate* '90|270|180'::
break;
}
if ((*args)[0] == '+' || (*args)[0] == '-') {
- int pix;
- if (sscanf(*args, "%i", &pix) == 1) {
- int max = (trg.node->split_type == TYPE_HORIZONTAL ? trg.node->rectangle.height : trg.node->rectangle.width);
- double rat = ((max * trg.node->split_ratio) + pix) / max;
+ float delta;
+ if (sscanf(*args, "%f", &delta) == 1) {
+ double rat = trg.node->split_ratio;
+ if (delta > -1 && delta < 1) {
+ rat += delta;
+ } else {
+ int max = (trg.node->split_type == TYPE_HORIZONTAL ? trg.node->rectangle.height : trg.node->rectangle.width);
+ rat = ((max * rat) + delta) / max;
+ }
if (rat > 0 && rat < 1) {
set_ratio(trg.node, rat);
} else {