.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 07/25/2017
+.\" Date: 07/30/2017
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.3-14-gefec936
+.\" Source: Bspwm 0.9.3-16-ga4c5b29
.\" Language: English
.\"
-.TH "BSPWM" "1" "07/25/2017" "Bspwm 0\&.9\&.3\-14\-gefec936" "Bspwm Manual"
+.TH "BSPWM" "1" "07/30/2017" "Bspwm 0\&.9\&.3\-16\-ga4c5b29" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Add a monitor for the given name and rectangle\&.
.RE
.PP
+\fB\-O\fR, \fB\-\-reorder\-monitors\fR <name>\&...
+.RS 4
+Reorder the list of monitors to match the given order\&.
+.RE
+.PP
\fB\-o\fR, \fB\-\-adopt\-orphans\fR
.RS 4
Manage all the unmanaged windows remaining from a previous session\&.
*-a*, *--add-monitor* <name> WxH+X+Y::
Add a monitor for the given name and rectangle.
+*-O*, *--reorder-monitors* <name>...::
+ Reorder the list of monitors to match the given order.
+
*-o*, *--adopt-orphans*::
Manage all the unmanaged windows remaining from a previous session.
fail(rsp, "wm %s: Invalid argument: '%s'.\n", *(args - 1), *args);
break;
}
+ } else if (streq("-O", *args) || streq("--reorder-monitors", *args)) {
+ num--, args++;
+ if (num < 1) {
+ fail(rsp, "wm %s: Not enough arguments.\n", *(args - 1));
+ return;
+ }
+ monitor_t *m = mon_head;
+ while (m != NULL && num > 0) {
+ monitor_t *next = m->next;
+ coordinates_t dst;
+ if (locate_monitor(*args, &dst)) {
+ swap_monitors(m, dst.monitor);
+ if (next == dst.monitor) {
+ next = m;
+ }
+ }
+ m = next;
+ num--, args++;
+ }
} else if (streq("-o", *args) || streq("--adopt-orphans", *args)) {
adopt_orphans();
} else if (streq("-g", *args) || streq("--get-status", *args)) {