Resizes active window size to width and height of the output when the
window size exceeds the output size.
-*<action name="GoToDesktop" to="value" wrap="yes" />*
+*<action name="GoToDesktop" to="value" wrap="yes" toggle="no" />*
Switch to workspace.
*to* The workspace to switch to. Supported values are "current", "last",
*wrap* [yes|no] Wrap around from last desktop to first, and vice
versa. Default yes.
+ *toggle* [yes|no] Toggle to “last” if already on the workspace that
+ would be the actual destination. Default no.
+
*<action name="SendToDesktop" to="value" follow="yes" wrap="yes" />*
Send active window to workspace.
action_arg_add_bool(action, argument, parse_bool(content, true));
goto cleanup;
}
+ if (!strcmp(argument, "toggle")) {
+ action_arg_add_bool(
+ action, argument, parse_bool(content, false));
+ goto cleanup;
+ }
break;
case ACTION_TYPE_TOGGLE_SNAP_TO_REGION:
case ACTION_TYPE_SNAP_TO_REGION:
*/
struct workspace *target_workspace = workspaces_find(
server->workspaces.current, to, wrap);
+ if (action->type == ACTION_TYPE_GO_TO_DESKTOP) {
+ bool toggle = action_get_bool(action, "toggle", false);
+ if (target_workspace == server->workspaces.current
+ && toggle) {
+ target_workspace = server->workspaces.last;
+ }
+ }
if (!target_workspace) {
break;
}