Toggle always-on-top of focused window.
*<action name="GoToDesktop"><to>*
- Switch to workspace. Supported values are "left", "right" or the full
- name of a workspace or its index (starting at 1) as configured in rc.xml.
+ Switch to workspace. Supported values are "last", "left", "right" or the
+ full name of a workspace or its index (starting at 1) as configured in
+ rc.xml.
*<action name="SendToDesktop"><to>*
Send active window to workspace.
/* Workspaces */
struct wl_list workspaces; /* struct workspace.link */
struct workspace *workspace_current;
+ struct workspace *workspace_last;
struct wl_list outputs;
struct wl_listener new_output;
/* Enable the new workspace */
wlr_scene_node_set_enabled(&target->tree->node, true);
+ /* Save the last visited workspace */
+ target->server->workspace_last = target->server->workspace_current;
+
/* Make sure new views will spawn on the new workspace */
target->server->workspace_current = target;
return target;
}
}
+ } else if (!strcasecmp(name, "last")) {
+ return anchor->server->workspace_last;
} else if (!strcasecmp(name, "left")) {
return get_prev(anchor, workspaces);
} else if (!strcasecmp(name, "right")) {