+ while (1) {
+ ws = TAILQ_PREV(ws, workspaces_head, workspaces);
+
+ if (ws == TAILQ_END(workspaces))
+ ws = TAILQ_LAST(workspaces, workspaces_head);
+
+ if (ws == c_ws)
+ return;
+
+ if (ws->output == NULL)
+ continue;
+
+ workspace_show(conn, ws->num + 1);
+ return;
+ }
+ }
+}
+
+static void parse_resize_command(xcb_connection_t *conn, Client *last_focused, const char *command) {
+ int first, second;
+ resize_orientation_t orientation = O_VERTICAL;
+ Container *con = last_focused->container;
+ Workspace *ws = last_focused->workspace;
+
+ if (client_is_floating(last_focused)) {
+ DLOG("Resizing a floating client\n");
+ if (STARTS_WITH(command, "left")) {
+ command += strlen("left");
+ last_focused->rect.width += atoi(command);
+ last_focused->rect.x -= atoi(command);
+ } else if (STARTS_WITH(command, "right")) {
+ command += strlen("right");
+ last_focused->rect.width += atoi(command);
+ } else if (STARTS_WITH(command, "top")) {
+ command += strlen("top");
+ last_focused->rect.height += atoi(command);
+ last_focused->rect.y -= atoi(command);
+ } else if (STARTS_WITH(command, "bottom")) {
+ command += strlen("bottom");
+ last_focused->rect.height += atoi(command);
+ } else {
+ ELOG("Syntax: resize <left|right|top|bottom> [+|-]<pixels>\n");