Add a new command 'move to workspace current'

Added a new command 'move to workspace current' which can be used
with criteria to move a window to the current workspace.
This commit is contained in:
Pavel Löbl
2012-05-09 23:45:12 +02:00
committed by Michael Stapelberg
parent 51173baf28
commit 2afecaf355
4 changed files with 43 additions and 5 deletions

View File

@ -351,7 +351,7 @@ void cmd_criteria_add(I3_CMD, char *ctype, char *cvalue) {
/*
* Implementation of 'move [window|container] [to] workspace
* next|prev|next_on_output|prev_on_output'.
* next|prev|next_on_output|prev_on_output|current'.
*
*/
void cmd_move_con_to_workspace(I3_CMD, char *which) {
@ -380,6 +380,8 @@ void cmd_move_con_to_workspace(I3_CMD, char *which) {
ws = workspace_next_on_output();
else if (strcmp(which, "prev_on_output") == 0)
ws = workspace_prev_on_output();
else if (strcmp(which, "current") == 0)
ws = con_get_workspace(focused);
else {
ELOG("BUG: called with which=%s\n", which);
ysuccess(false);