Closes #1253.
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 12/24/2020
+.\" Date: 05/28/2021
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.10-18-g87822b5
+.\" Source: Bspwm 0.9.10-25-g94c3c69
.\" Language: English
.\"
-.TH "BSPWM" "1" "12/24/2020" "Bspwm 0\&.9\&.10\-18\-g87822b5" "Bspwm Manual"
+.TH "BSPWM" "1" "05/28/2021" "Bspwm 0\&.9\&.10\-25\-g94c3c69" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Circulate the windows of the tree rooted at the selected node\&.
.RE
.PP
-\fB\-t\fR, \fB\-\-state\fR [~](tiled|pseudo_tiled|floating|fullscreen)
+\fB\-t\fR, \fB\-\-state\fR ~|[~]\fISTATE\fR
.RS 4
Set the state of the selected window\&. If
\fB~\fR
-is present and the current state matches the given state, then the argument is interpreted as the last state\&.
+is present and the current state matches
+\fISTATE\fR, then the argument is interpreted as its last state\&. If the argument is just
+\fB~\fR
+with
+\fISTATE\fR
+omitted, then the state of the selected window is set to its last state\&.
.RE
.PP
\fB\-g\fR, \fB\-\-flag\fR hidden|sticky|private|locked|marked[=on|off]
*-C*, *--circulate* forward|backward::
Circulate the windows of the tree rooted at the selected node.
-*-t*, *--state* [~](tiled|pseudo_tiled|floating|fullscreen)::
- Set the state of the selected window. If *~* is present and the current state matches the given state, then the argument is interpreted as the last state.
+*-t*, *--state* \~|\[~]'STATE'::
+ Set the state of the selected window. If *\~* is present and the current state matches 'STATE', then the argument is interpreted as its last state. If the argument is just *~* with 'STATE' omitted, then the state of the selected window is set to its last state.
*-g*, *--flag* hidden|sticky|private|locked|marked[=on|off]::
Set or toggle the given flag for the selected node.
alternate = true;
(*args)++;
}
- if (parse_client_state(*args, &cst)) {
- if (alternate && trg.node != NULL && trg.node->client != NULL &&
- trg.node->client->state == cst) {
+ if (alternate && (*args)[0] == '\0') {
+ if (trg.node != NULL && trg.node->client != NULL) {
cst = trg.node->client->last_state;
- }
- if (!set_state(trg.monitor, trg.desktop, trg.node, cst)) {
+ } else {
fail(rsp, "");
break;
}
- changed = true;
+ } else if (parse_client_state(*args, &cst)) {
+ if (alternate && trg.node != NULL && trg.node->client != NULL &&
+ trg.node->client->state == cst) {
+ cst = trg.node->client->last_state;
+ }
} else {
fail(rsp, "node %s: Invalid argument: '%s'.\n", *(args - 1), *args);
break;
}
+ if (!set_state(trg.monitor, trg.desktop, trg.node, cst)) {
+ fail(rsp, "");
+ break;
+ }
+ changed = true;
} else if (streq("-g", *args) || streq("--flag", *args)) {
num--, args++;
if (num < 1) {