From: Noe Rubinstein Date: Sun, 2 Oct 2011 15:55:19 +0000 (+0200) Subject: add "move workspace next" and "move workspace prev" X-Git-Tag: 4.1~125^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1eab86b9164a0309338ca72a716437738b9b0ef8;p=i3%2Fi3 add "move workspace next" and "move workspace prev" some factorization would be better here, however I don't really know my way around bison --- diff --git a/src/cmdparse.y b/src/cmdparse.y index 252f6dff..da962cf4 100644 --- a/src/cmdparse.y +++ b/src/cmdparse.y @@ -715,6 +715,38 @@ move: tree_render(); } + | TOK_MOVE TOK_WORKSPACE TOK_NEXT + { + owindow *current; + + /* get the workspace */ + Con *ws = workspace_next(); + + HANDLE_EMPTY_MATCH; + + TAILQ_FOREACH(current, &owindows, owindows) { + printf("matching: %p / %s\n", current->con, current->con->name); + con_move_to_workspace(current->con, ws, true, false); + } + + tree_render(); + } + | TOK_MOVE TOK_WORKSPACE TOK_PREV + { + owindow *current; + + /* get the workspace */ + Con *ws = workspace_prev(); + + HANDLE_EMPTY_MATCH; + + TAILQ_FOREACH(current, &owindows, owindows) { + printf("matching: %p / %s\n", current->con, current->con->name); + con_move_to_workspace(current->con, ws, true, false); + } + + tree_render(); + } | TOK_MOVE TOK_OUTPUT STR { owindow *current;