add "move workspace next" and "move workspace prev"

some factorization would be better here, however I don't really know my
way around bison
This commit is contained in:
Noe Rubinstein 2011-10-02 17:55:19 +02:00 committed by Michael Stapelberg
parent b2ad9a77c8
commit 1eab86b916
1 changed files with 32 additions and 0 deletions

View File

@ -715,6 +715,38 @@ move:
tree_render(); 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 | TOK_MOVE TOK_OUTPUT STR
{ {
owindow *current; owindow *current;